Skip to content

Commit fee38af

Browse files
committed
Document behaviour of .[] on objects.
Closes #57.
1 parent cacda19 commit fee38af

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/content/3.manual/manual.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ sections:
181181
numbers as three separate results, rather than as a single
182182
array.
183183
184+
You can also use this on an object, and it will return all
185+
the values of the object.
186+
184187
examples:
185188
- program: '.[]'
186189
input: '[{"name":"JSON", "good":true}, {"name":"XML", "good":false}]'
@@ -192,6 +195,10 @@ sections:
192195
input: '[]'
193196
output: []
194197

198+
- program: '.[]'
199+
input: '{"a": 1, "b": 2}'
200+
output: ['[1, 2]']
201+
195202
- title: "`,`"
196203
body: |
197204

0 commit comments

Comments
 (0)