Nov 12 2014

Counting Items in JSON Object

For basic JSON tasks (e.g., querying, counting) I use the jq command-line utility.

To get a count of the items in a JSON object use the following command:

jq '. | length' /myfiles/data.json

Still interested? Check out the full tutorial and the manual.

Permanent link to this article: http://ericsilva.org/2014/11/12/counting-items-in-json-object/

Leave a Reply