Closed pavelsr closed 4 years ago
127.0.0.1:6379> json.set user1 . '{"last":"Joe", "first":[{"code":"1"}, {"code":"2"}]}'
OK
127.0.0.1:6379> json.get user1 "$.first[?(@.code==\"2\")]"
"{\"code\":\"2\"}"
Hi @gkorland
Thanks for explanation, this works.
Btw, when using $
symbol redis crashed (without it works fine)
127.0.0.1:6379> json.set user2 . '[{"code":"1"}, {"code":"2"}]'
OK
127.0.0.1:6379> json.get user2 ".[?(@.code==\"2\")]"
"{\"code\":\"2\"}"
127.0.0.1:6379> json.get user2 "$.[?(@.code==\"2\")]"
# redis-cli closed and redis docker container crashed
I use latest docker redislabs/redisjson2 image.
thanks! we'll fix it
Hi, I tried to use JsonPath filter expression and got
Invalid argument(s)
error :Seems like filter expressions is not supported yet, right ? If it's supported - please provide example. Thanks a lot.