meraki-cli icon indicating copy to clipboard operation
meraki-cli copied to clipboard

Complex data tabulation using the -s option

Open PackeTsar opened this issue 3 months ago • 0 comments

Allow the input of JSONPath-like syntax to extract complex data for tabulation.

Example:

The meraki networks getNetworkClients command provides output like

    {
        "id": "xxxxxxxx",
        "mac": "xx:xx:xx:xx:xx:xx",
        "description": "SomeEndpoint",
        "usage": {
            "sent": 711311,
            "recv": 345962,
            "total": 1057274
        },
        "status": "Online",
        "notes": null,
        "groupPolicy8021x": null,
        "adaptivePolicyGroup": null,
        "smInstalled": false
    }

Normally, the usage data is squashed out of tabulation.

Allow the use of an option like -s "id,mac,usage.sent,usage.recv" with dot-separators to extract and tabulate the nested data.

PackeTsar avatar Mar 08 '24 13:03 PackeTsar