You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`..*` or `..[*]`| Wildcard operator with recursive descent explodes the contents of your JSON quite well
25
25
`()`| A script expression uses the returned value of the expression to as the property name or index
26
26
`?()`| A filter expression interrogates all array/object members against the expression, descending into or returning the value of those that match
27
-
`@` | Use inside a filter or script expression. `@` is substituted with the value of the current object, `@name` will match the current property name, `@.length` will reference the length of an array or string, `@.key` will reference the property "key" of the current object
27
+
`@` | Use inside a filter or script expression. `@` is substituted with the value of the current object, `@name` will match the current property name, `@.length` will reference the length of an array or string, `@.key`, `@["key"]`, or `@['key']` would reference the property named "key" of the current object, `@[1]` would be used for an array
28
28
`[]`| Subscript/child operator; can contain quoted property names (`'key'`,`"key"`), numbers (negative or positive), filter and script expressions, `*` and `-` operators
29
29
`[start:end:step]`| Array/string slice operator like Python's, all field are optional, start and end default to bounds, step can be negative
30
30
`[,]`| Union operator `,` allows multiple quoted key names, array indices, slices, script/filter expressions, and `*` to be combined
@@ -221,9 +221,7 @@ expr = expr.split('/')
221
221
expr.shift()
222
222
//replace special symbols ~1 and ~0 (in this order) with the actual characters
223
223
//convert string representations of numbers to Number types (for proper quoting in PATH output)
224
-
expr =expr.map(function (f){
225
-
returnf.replace(/~1/g,"/").replace(/~0/g,"~") })
226
-
.map(function(a){ return a ===""?"":isNaN(a) ? a :Number(a)})
0 commit comments