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
JSON.ARRINDEX should return multiple indices
(Related to #460)
json.set store $ '{"store":{"book":[{"category":"reference","author":"Nigel Rees","title":"Sayings of the Century","price":8.95,"size":[10,20,30,40]},{"category":"fiction","author":"Evelyn Waugh","title":"Sword of Honour","price":12.99,"size":[50,60,70,80]},{"category":"fiction","author":"Herman Melville","title":"Moby Dick","isbn":"0-553-21311-3","price":8.99,"size":[5,10,20,30]},{"category":"fiction","author":"J. R. R. Tolkien","title":"The Lord of the Rings","isbn":"0-395-19395-8","price":22.99,"size":[5,6,7,8]}],"bicycle":{"color":"red","price":19.95}}}'
OK
json.get store '$.store.book[?(@.price<10)].size'
"[[10,20,30,40],[5,10,20,30]]"
json.arrindex store '$.store.book[?(@.price<10)].size' 20
(integer) 1
Should return something like
json.arrindex store '$.store.book[?(@.price<10)].size' 20
"[1,2]"
Or with concrete paths (in an object)
json.arrindex store '$.store.book[?(@.price<10)].size' 20
"{\"$.store.book[0].size\":1,\"$.store.book[2].size\":2}"
Or with concrete paths (in an array)
json.arrindex store '$.store.book[?(@.price<10)].size' 20
"[\"$.store.book[0].size\",1,\"$.store.book[2].size\",2]"
The text was updated successfully, but these errors were encountered:
JSON.ARRINDEX should return multiple indices
(Related to #460)
Should return something like
Or with concrete paths (in an object)
Or with concrete paths (in an array)
The text was updated successfully, but these errors were encountered: