Giter VIP home page Giter VIP logo

Comments (8)

stockholmux avatar stockholmux commented on June 15, 2024 1

@aniruddhadas
I can confirm it supports multi-level selects:

> JSON.SET key2 . '{"a":"1", "b": { "x" : 45, "y" : 21 }, "c":"1"}'
OK
> JSON.GET key2 a b.x
"{\"a\":\"1\",\"b.x\":45}"

from redisjson.

mnunberg avatar mnunberg commented on June 15, 2024

Hi. This sounds a lot like what this module does already. Can you please show an example of input/output that you've tried, and what kind of change you want to see in the current module, and why?

from redisjson.

aniruddhadas avatar aniruddhadas commented on June 15, 2024

Hi. The problem is rejson only pulls out one attribute, we store large json documents in redis. We are looking for some way to pull out multiple parts from the json document in a single call. for e.g.:
document in redis: key1: {'a':'1', 'b':'1', 'c':'1'}. We want to pull out a and c from the document so something like
Input: JSON.GET key .a .c
Output: key1: {'a':'1', 'c':'1'}

from redisjson.

arpitmalhotra avatar arpitmalhotra commented on June 15, 2024

+1 This would be a really useful feature to have.

from redisjson.

itamarhaber avatar itamarhaber commented on June 15, 2024

Hello @aniruddhadas,

Please read the docs and/or experiment - ReJSON's JSON.GET already supports multiple paths:

127.0.0.1:6379> JSON.SET key1 . '{"a":"1", "b":"1", "c":"1"}'
OK
127.0.0.1:6379> JSON.GET key1 a b
"{\"a\":\"1\",\"b\":\"1\"}"

I believe this issue can be closed.

Cheers,
Itamar

from redisjson.

aniruddhadas avatar aniruddhadas commented on June 15, 2024

Thanks @itamarhaber! This is awesome! One quick questions, does this support multi level selects or index based selects?

JSON.SET key1 . '{"a":"1", "b":"1", "c":"{ "x":"1" }"}'
JSON.GET key1 a c.x?

We use jedis. I dont think Jedis supports this ReJson but we can work around it.

from redisjson.

aniruddhadas avatar aniruddhadas commented on June 15, 2024

Thanks @stockholmux, @mnunberg and @itamarhaber for the quick feedback! This is awesome! Adding documentation link here for completeness: https://github.com/RedisLabsModules/rejson/blob/master/docs/commands.md#jsonget

I will close this.

from redisjson.

itamarhaber avatar itamarhaber commented on June 15, 2024

@aniruddhadas the latest docs should also be always available online at https://oss.redislabs.com/rejson/commands/#jsonget

Happy hacking!

from redisjson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.