Comments (8)
@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.
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.
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.
+1 This would be a really useful feature to have.
from redisjson.
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.
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.
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.
@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)
- Wrong result when using a filter expression on a non-existing child array
- JSON Path and RESP3 HOT 15
- JSON.MGET not working properly in Redis Enterprise Sharded Cluster
- add sorted nested array supported and other redis data structure nested supported HOT 2
- JSON.DEL emits no `del` event when removing the entire value
- not work expiry time for JSON record
- Does version 2.6.6 necessarily require Redis 7.2? HOT 4
- Consistent crash with Redis 6.2.4 HOT 3
- RedisJSON uses more memory than raw dataset size HOT 1
- `json.arrinsert` is not atomic HOT 1
- Revert JSONPath default path value from `$` to `.` under RESP3 HOT 1
- Build error on Windows HOT 5
- [Fix documentation] : go-redis supports JSON
- Is it possible to cross-compile
- cargo make issue: invalid type: map, expected a string for key `package.edition`
- Sort DESC not working on date field.
- [crash] Redis Stack Cluster 7.2.4 with RedisJSON 2.6.7 HOT 3
- not able to build v2.6.9 HOT 1
- Redis 6.2.14 crashing when loading module librejson.so RedisJSON v2.6.9 HOT 1
- Can't Load Module on Rasberry Pi 3. Is Arm64 supported? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redisjson.