]> granicus.if.org Git - jq/commitdiff
Document behaviour of .[] on objects.
authorStephen Dolan <mu@netsoc.tcd.ie>
Mon, 6 May 2013 01:37:34 +0000 (02:37 +0100)
committerStephen Dolan <mu@netsoc.tcd.ie>
Mon, 6 May 2013 01:37:34 +0000 (02:37 +0100)
Closes #57.

docs/content/3.manual/manual.yml

index 374d5046058fd1fa2f22c67bcd7a9f06b5e7989c..eac28a3c2d6036c03fa6ea187aa82bcb93264037 100644 (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: |