]> granicus.if.org Git - jq/commitdiff
Add documentation for "type".
authorStephen Dolan <mu@netsoc.tcd.ie>
Mon, 6 May 2013 01:34:02 +0000 (02:34 +0100)
committerStephen Dolan <mu@netsoc.tcd.ie>
Mon, 6 May 2013 01:34:02 +0000 (02:34 +0100)
Closes #75.

docs/content/3.manual/manual.yml

index 166a385ac6822f9cf4a5017a441cd7116b4fc7e1..374d5046058fd1fa2f22c67bcd7a9f06b5e7989c 100644 (file)
@@ -537,6 +537,18 @@ sections:
             input: '[1, "1", [1]]'
             output: ['"1"', '"1"', '"[1]"']
 
+      - title: `type`
+        body: |
+          
+          The `type` function returns the type of its argument as a
+          string, which is one of null, boolean, number, string, array
+          or object.
+
+        examples:
+          - program: 'map(type)'
+            input: '[0, false, [], {}, null, "hello"]'
+            output: ['["number", "boolean", "array", "object", "null", "string"]']
+
       - title: `sort, sort_by`
         body: |