redisjson-py icon indicating copy to clipboard operation
redisjson-py copied to clipboard

Get/Filter in a JSON Key Values

Open wscardua opened this issue 4 years ago • 3 comments

Hi Guys,

look my json

JSON.GET 906461499 "{"name": "jony", "time": "10:36:49", "date": "20190109", "ope": "U", "table": "C20010", "field": "U"}"

How can I get/filter in a JSON key value, like "name = 'jony'"

Thank you

wscardua avatar May 14 '20 13:05 wscardua

You should use the master version of RedisJSON https://github.com/RedisJSON/RedisJSON

JSON.QGET person "@name:jony"

gkorland avatar May 14 '20 14:05 gkorland

Hi gkorland,

Thank you ..,

but I receive a error when I try to create a index

JSON.INDEX ADD name_idx name $.name (error) unknown command JSON.INDEX, with args beginning with: ADD, name_idx, name, $.name,

module list

    1. "name"
    2. "ft"
    3. "ver"
    4. (integer) 10613
    1. "name"
    2. "ReJSON"
    3. "ver"
    4. (integer) 10004

wscardua avatar May 14 '20 15:05 wscardua

@wscardua which version are you using? Notice JSON.INDEX is only available on master. You can also get it from dockerhub docker pull redislabs/rejson:edge

gkorland avatar May 21 '20 09:05 gkorland