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:

Leave a Reply