-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not certain how to ask this --- filtering/json/other #25
Comments
If you turn up the debugging by running This squash happens because tabulation can only really be done against simple data structures which is where the value in each object's key,value pairs is something simple like a string or an integer. In the case of the There is currently no way in Meraki-CLI to coerce an object value to be tabulated. But that is something worth considering adding as a feature if it's something generally useful. |
thanks!I did do the debug and saw the message but did not understand what it was telling me. I am still not completely clear on it but your explanation has helped!!!thanks,carlOn Oct 10, 2024 7:59 AM, John W Kerns ***@***.***> wrote:
If you turn up the debugging by running meraki -ddd -s id,name organizations getOrganizations, you will see why api doesn't appear in the tabulated data. It doesn't appear because it get squashed out of the data to be tabulated.
This squash happens because tabulation can only really be done against simple data structures which is where the value in each object's key,value pairs is something simple like a string or an integer. In the case of the api key, the value is complex (since it's another object).
There is currently no way in Meraki-CLI to coerce an object value to be tabulated. But that is something worth considering adding as a feature if it's something generally useful.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
The documentation also talks about it here in the "Incomplete Columns" box. What it means is that Meraki-CLI can only turn simple data into a table. For example, this list of objects with simple values: [
{
"id": "1234",
"name": "Some Org 1",
},
{
"id": "5678",
"name": "Some Org 2",
}
] can be easily tabulated like this:
but if those any of the values in the objects are complex (ie: not a simple data type): [
{
"id": "1234",
"name": "Some Org 1",
"api": {
"enabled": true
}
},
{
"id": "5678",
"name": "Some Org 2",
"api": {
"enabled": true
}
}
] then they can't be accurately tabulated. |
thanks!!!On Oct 10, 2024 8:30 AM, John W Kerns ***@***.***> wrote:
The documentation also talks about it here in the "Incomplete Columns" box.
What it means is that Meraki-CLI can only turn simple data into a table. For example, this list of objects with simple values:
[
{
"id": "1234",
"name": "Some Org 1",
},
{
"id": "5678",
"name": "Some Org 2",
}
]
can be easily tabulated like this:
idname1234Some Org 15678Some Org 2
but if those any of the values in the objects are complex (ie: not a simple data type):
[
{
"id": "1234",
"name": "Some Org 1",
"api": {
"enabled": true
}
},
{
"id": "5678",
"name": "Some Org 2",
"api": {
"enabled": true
}
}
]
then they can't be accurately tabulated.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
If I execute this command meraki -j organizations getOrganizations I get the output , in json, that contains for example:
"api": {
"enabled": true
},
What would be the correct syntax to run the command where I could get id,name and "api"?
This will give me id and name: meraki -s id,name organizations getOrganizations but adding api to the '-s' does not work. I tried debugging but I was unable to use that information to figure out what I am wanting.
First, is what I want to do possible?
If so, what am I doing wrong when attempting to get arrays/dictionaries of sub elements or am I even using the correct terms?
THANKS!!
The text was updated successfully, but these errors were encountered: