1
0
mirror of https://github.com/stedolan/jq.git synced 2024-05-11 05:55:39 +00:00

Document behaviour of .[] on objects.

Closes #57.
This commit is contained in:
Stephen Dolan
2013-05-06 02:37:34 +01:00
parent cacda19e75
commit fee38afd8b

View File

@@ -181,6 +181,9 @@ sections:
numbers as three separate results, rather than as a single
array.
You can also use this on an object, and it will return all
the values of the object.
examples:
- program: '.[]'
input: '[{"name":"JSON", "good":true}, {"name":"XML", "good":false}]'
@@ -192,6 +195,10 @@ sections:
input: '[]'
output: []
- program: '.[]'
input: '{"a": 1, "b": 2}'
output: ['[1, 2]']
- title: "`,`"
body: |