{"_id":"@node-redis/json","_rev":"4-f4c341467e47e9908cb1df5af6033c82","name":"@node-redis/json","dist-tags":{"next":"1.0.0-rc.0","latest":"1.0.2"},"versions":{"1.0.0-rc.0":{"name":"@node-redis/json","version":"1.0.0-rc.0","license":"MIT","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"test":"nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'","build":"tsc"},"peerDependencies":{"@node-redis/client":"^1.0.0-rc"},"devDependencies":{"@istanbuljs/nyc-config-typescript":"^1.0.1","@node-redis/test-utils":"*","@types/node":"^16.11.7","nyc":"^15.1.0","release-it":"^14.11.7","source-map-support":"^0.5.20","ts-node":"^10.4.0","typescript":"^4.4.4"},"gitHead":"4bca55afff38fe24bf513e58efa430a6c60833ce","description":"The sources and docs for this package are in the main [node-redis](https://github.com/redis/node-redis) repo.","_id":"@node-redis/json@1.0.0-rc.0","_nodeVersion":"16.10.0","_npmVersion":"8.1.2","dist":{"integrity":"sha512-bSLHcDWZKGvLIq8YjpkZJNy8FnNQSZNlYwNSvnUIDV+NInhWcY3e0i0xkBbGevrXscNUzPMZCUDMW9/SI/57sQ==","shasum":"6df8b01254bc4422cfc0efbed59754da2a217a2d","tarball":"https://registry.npmjs.org/@node-redis/json/-/json-1.0.0-rc.0.tgz","fileCount":88,"unpackedSize":43158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk1/QCRA9TVsSAnZWagAAGwIP/1OlNoM5qSxo00p4KEqe\nQ92F5K3LljG0I82vQaqHGht+hth2nIVsejylVJYEjTFzuwReJivzRhHbBuSS\npK9xIwURdWoVecfsEijmDHQD4g92xvFKzkDmtE6UcsBp03zGvrWNO+a5X5em\ndd9GYDkzJc6QlSdtkh7bR/0Xvxqa24FP00N0WFJzgEoMmDlJKuxE8ER5Jfg2\nxt+3iRt/qjgSifhH+Dv0Mln/JIO1Fqb/VeYz86lAIrWy7BVNrFugeSr0d35u\nEfrNo3R4ALkKI9D8GvcbYpVue4se/OaAnyQE6rtsnPcIVk+Df1IEXO7Vc68F\nEr83U2O006XecbLcJxMRDxU0yy1+k7uOlyVRpPmcSvbUxP7nRXt8C76uXPft\n81jOa3KwNw0dYuO3MNxtyd3YZUyYkMEBtd1QZ9VgeRCxJepN4pRg6ePNyHb/\nvsi+Mx63039eqSGXyF3AJx5axXkeDAK5W0ZQo3eldcIH+79C79UdlwFGiyY2\nTOyhDOL5zGgiVTPwEgoDyBB2PT9C15clEqTKq7M7GDfnBawKJYuJZgBMDvIy\nRpIITuly2Q1u9iXDV/COcmWtD0M5JMdu2hNiMkRvYlvqiBo02+qP0rW33x4T\nbbZutnz0vHVMpT1l9GIeTQMM6++X9ZuNukM1acA8vv6KrmcAjZy7l8LCfPyg\n507T\r\n=oR95\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHG6qYWblb5rjWcqWEOpr+omPFVW7farFGI8/lVktrSnAiEAqs9b0n51eScA1gpKn7M/+avO0NE+swgjezRuuYkgkWA="}]},"_npmUser":{"name":"leibale","email":"leibale1998@gmail.com"},"directories":{},"maintainers":[{"name":"leibale","email":"leibale1998@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json_1.0.0-rc.0_1637048272119_0.8845988123998425"},"_hasShrinkwrap":false},"1.0.0":{"name":"@node-redis/json","version":"1.0.0","license":"MIT","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"test":"nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'","build":"tsc"},"peerDependencies":{"@node-redis/client":"^1.0.0"},"devDependencies":{"@istanbuljs/nyc-config-typescript":"^1.0.1","@node-redis/test-utils":"*","@types/node":"^16.11.10","nyc":"^15.1.0","release-it":"^14.11.8","source-map-support":"^0.5.21","ts-node":"^10.4.0","typescript":"^4.5.2"},"gitHead":"ae06af64fa944948fbe76529a7eba31a0f419c57","description":"This package provides support for the [RedisJSON](https://redisjson.io) module, which adds JSON as a native data type to Redis.  It extends the [Node Redis client](https://github.com/redis/node-redis) to include functions for each of the RedisJSON command","_id":"@node-redis/json@1.0.0","_nodeVersion":"16.10.0","_npmVersion":"8.1.2","dist":{"integrity":"sha512-6e4qjbHODfr/KFsHYvkbfNui/kedVz+cG7Hz8oNbZM3p68QLf3A8FjcPYzixBp/QbvPeOSLgj39DjVEqjKkqkw==","shasum":"11ba5882ac1f3226a8042f5de318c94bad520802","tarball":"https://registry.npmjs.org/@node-redis/json/-/json-1.0.0.tgz","fileCount":88,"unpackedSize":45563,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnvosCRA9TVsSAnZWagAAs5UQAIUA1j3hK7Ctcqp6xVg3\nKJ1ozyH8lFH+ukAKNxXQWsYayCxX/Yq9HaHWRBCywwhPh4Qs0cxRHT4AFY+b\nlfIL7y665csfWwNNPsSaZQls3EhOLr6+JDxuEaa7dW822ZKDf6P370Wsb44r\nGbDrtZ3JEM66veNpNN/SKe+hBD5pLYg2GdWysjK8IhnhCNGeOKKzCoxwSOsN\n0sMWoWmFzedIi8AawnlwJUta7f/i5X3SRpRi3ILV7WBVO7QZkzbZICIm69kY\nCWk7EyWzz/AlvJZoQWRLxZg0WgfkdnndSwW1Tspzj6RIfZMtYbW3csb5GMmv\ni0wRJIdHVhTBMu5QqeqFq/ol8/vXahm3Ywzw7u/IxT0dx/TIjCVp37CmdZhj\nY+mvwFtlHkvWi3bTl80jlK65bChtdFY7Crr2MYKMh5qGE8blq4y/847uxiYq\nQN75ICvU/I4HeisEvj+gYeDL3mXCyuW/TV45F50azdOCcgn0jEtXyWd81eyw\nDeUCBc8TXCHj3Sf52bB0WYoRAodkqVpgWt0dBEA864hq9C2I16+RRC14JjlZ\n63O182Kej1uoKyjC523XCclcMsRQT218mQUhe0nObM99q2bJ1UVhVuW/GOpz\ng8xq3rl+YOzgAxKGlLJuvaOtZgPEcA8ipE0OMn9j7eSHIruFohsBEq4zPkDE\nP32F\r\n=o9Go\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUTV1pm+JJvk5AJ6LIGhZ6iqynXZMy/o9hbWpGy0b/CAiEAzIT43v6X1PQsUVrOJ7uS8oaUHe6f6QGJn/ml3qZoQts="}]},"_npmUser":{"name":"leibale","email":"leibale1998@gmail.com"},"directories":{},"maintainers":[{"name":"leibale","email":"leibale1998@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json_1.0.0_1637808684782_0.6206540934285112"},"_hasShrinkwrap":false},"1.0.1":{"name":"@node-redis/json","version":"1.0.1","license":"MIT","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"test":"nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'","build":"tsc","documentation":"typedoc"},"peerDependencies":{"@node-redis/client":"^1.0.0"},"devDependencies":{"@istanbuljs/nyc-config-typescript":"^1.0.2","@node-redis/test-utils":"*","@types/node":"^16.11.12","nyc":"^15.1.0","release-it":"^14.11.8","source-map-support":"^0.5.21","ts-node":"^10.4.0","typedoc":"^0.22.10","typescript":"^4.5.3"},"gitHead":"2449ad419731e8f1f2f97effb6bf88ac3400c677","description":"This package provides support for the [RedisJSON](https://redisjson.io) module, which adds JSON as a native data type to Redis.  It extends the [Node Redis client](https://github.com/redis/node-redis) to include functions for each of the RedisJSON command","_id":"@node-redis/json@1.0.1","_nodeVersion":"16.10.0","_npmVersion":"8.1.2","dist":{"integrity":"sha512-2EB96ZN0yUr4mgA9Odme48jX8eF5Ji0jrsRn4rLfEhME7L3rHLdKeUfxJKxbPOxadP6k8+6ViElxPZrKuV2nvQ==","shasum":"8cd987c1855392adf21bc4f06163a7eda97a40a3","tarball":"https://registry.npmjs.org/@node-redis/json/-/json-1.0.1.tgz","fileCount":46,"unpackedSize":23797,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJht6+FCRA9TVsSAnZWagAADlsQAJCapRH0jI0yvCfDc9IY\nbj4ORknuq+H69lFOPcWp2bFXCrB0X2i8mjTwUjob8LXc51hLvyTXBzr+HwPV\nHDwhc0sit3FHOrpkKXyqdm6WsqBOtH0uo4gj5jdQATpVx9mwwgVsDYlBP4Up\nwetCvGrbL88PY3KLkX8x0Z2XEaxeUawU1Usj6fDX/ieEKjCjPIeJPDRjUrXx\nJOWoKXnCXk7XIEdOCKdo1Fmfs24og5oUodKo0tT3ytfP9+889fanMb2QhYTF\ns/w4Xd+vtGTT42MudACsRcYSAVjYJ+WaGK4UUTlNvGnnW++SjjzYM/bvPJlB\nSwIAhLj2LxIi2iyvWSI8GaGA+kByBzKKDzlz2lhCOpBYNCBkUHfooNYea52Y\n6ZtUBch3RRz7dFWBxZBMPellRGhTWjRkKyvrEQrtbSmcJiLBIN0mCzBalYb2\n2JfpcTQTOK258dH0WOlknmfRev5U1gUrl6zG08Qwm5xUUUUDo9KiJrR8gxV3\nwfxxI610ix4InhU5xzY8N6UN5yFsid1nkJ403OAY1rserScDQy0NZ8Cc/Wbv\ncJIl0xVagWYUfnsONvO2gEvTKYaP61WTYtxKqOdBkheApBaxeNdfSHs0hhSs\nAJH70QAcAdd9aW2FsrBUk82mT6h52Me85Pk7hiH4kNm00WXVx6d16kuzorL0\n3zU/\r\n=BsIh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeJqr6WjH41hJs9g5RR8G9yoaB6aNg0y9qUvxboYKQiwIgZl+6zso6Hhs4skc/qY0vKHJc7jFbWP72BM+kkBhhkPE="}]},"_npmUser":{"name":"leibale","email":"leibale1998@gmail.com"},"directories":{},"maintainers":[{"name":"leibale","email":"leibale1998@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json_1.0.1_1639427973759_0.7072099200475312"},"_hasShrinkwrap":false},"1.0.2":{"name":"@node-redis/json","version":"1.0.2","license":"MIT","main":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"test":"nyc -r text-summary -r lcov mocha -r source-map-support/register -r ts-node/register './lib/**/*.spec.ts'","build":"tsc","documentation":"typedoc"},"peerDependencies":{"@node-redis/client":"^1.0.0"},"devDependencies":{"@istanbuljs/nyc-config-typescript":"^1.0.2","@node-redis/test-utils":"*","@types/node":"^17.0.8","nyc":"^15.1.0","release-it":"^14.12.1","source-map-support":"^0.5.21","ts-node":"^10.4.0","typedoc":"^0.22.10","typescript":"^4.5.4"},"gitHead":"2c4565f56c71ab11ccff285e76480fe152c167b1","description":"This package provides support for the [RedisJSON](https://redisjson.io) module, which adds JSON as a native data type to Redis.  It extends the [Node Redis client](https://github.com/redis/node-redis) to include functions for each of the RedisJSON command","_id":"@node-redis/json@1.0.2","_nodeVersion":"16.10.0","_npmVersion":"8.1.2","dist":{"integrity":"sha512-qVRgn8WfG46QQ08CghSbY4VhHFgaTY71WjpwRBGEuqGPfWwfRcIf3OqSpR7Q/45X+v3xd8mvYjywqh0wqJ8T+g==","shasum":"8ad2d0f026698dc1a4238cc3d1eb099a3bee5ab8","tarball":"https://registry.npmjs.org/@node-redis/json/-/json-1.0.2.tgz","fileCount":46,"unpackedSize":23409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4BpbCRA9TVsSAnZWagAAmDwP/jJ7KgWFm3EQpM8DGF75\nDaPlNQG0d8mRwmODTC/xpI1/R5JSuKkvEPub0dEZ6rcHEPMAQ0Mj1AgfEhJZ\niKBi6vaLGOBMDg2uNRSAaI8FKCvCo7WQsBqu4puFpNOot/3yjA4StC+LTRoe\ntGXr2PSGs6fyQd0rXeIogIS0ksYxRcgvbFv0eIZOU+82OWkWAUxzDrgUx9Bm\n6Le65ikGfXwxkoxWssDCkHFSA00wGZvvKupGJGx6OgSq4eQ6GRdYxPhWkIj8\nFt1xJvKSD04ESNbkhnle3RV0DYUrOiaihYaIZZb1o/MYPJAMyvQqS8s7reNU\nfU0gb8b2SR2GFvIhO0T7hGtX4NpvjkJTeYXaGAQygZJVuFlb8WlnA4U/amwa\nfyYaB7i7nx6wDa7a6tmiaGW+e3T0YVtRzizxaiflnDtUrn4ELMZM393ZXhvs\ngIZ+IY/isSPyCvQAoFU+5H6TkJ+7AZt/QH004aVYlQPe1YmZOzns7g1RWB0C\nBpMbCUyXaOC2Y865Ibtg5YqLeWvNqiw735B8WyW76S02u0bbwpfgo4YMhlx+\nTJJUswkUEyGcKXZHS6Fy4+tAimcth04UiGLJ8F6NE7wDcuhab+ZZOO84540D\nLLnULFHkKA6aaoYLIDHjV+hx6VkVwyDTJSZ4Amz65vFLAD3J2Ujl9jq2R3r+\nTHg4\r\n=lpIh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICzn6Wy1/S4wNQcooCpx9K2RNib48lQEWInOQG914Me6AiB1iTmwX52U10txRrC9AAyzboXp+zPDutxI2JbAD8/WRg=="}]},"_npmUser":{"name":"leibale","email":"leibale1998@gmail.com"},"directories":{},"maintainers":[{"name":"leibale","email":"leibale1998@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json_1.0.2_1642076763604_0.3192865639523699"},"_hasShrinkwrap":false}},"time":{"created":"2021-11-16T07:37:52.049Z","1.0.0-rc.0":"2021-11-16T07:37:52.276Z","modified":"2022-04-06T09:14:27.374Z","1.0.0":"2021-11-25T02:51:24.999Z","1.0.1":"2021-12-13T20:39:33.925Z","1.0.2":"2022-01-13T12:26:03.990Z"},"maintainers":[{"name":"leibale","email":"leibale1998@gmail.com"}],"description":"This package provides support for the [RedisJSON](https://redisjson.io) module, which adds JSON as a native data type to Redis.  It extends the [Node Redis client](https://github.com/redis/node-redis) to include functions for each of the RedisJSON command","license":"MIT","readme":"# @node-redis/json\n\nThis package provides support for the [RedisJSON](https://redisjson.io) module, which adds JSON as a native data type to Redis.  It extends the [Node Redis client](https://github.com/redis/node-redis) to include functions for each of the RedisJSON commands.\n\nTo use these extra commands, your Redis server must have the RedisJSON module installed.\n\n## Usage\n\nFor a complete example, see [`managing-json.js`](https://github.com/redis/node-redis/blob/master/examples/managing-json.js) in the Node Redis examples folder.\n\n### Storing JSON Documents in Redis\n\nThe [`JSON.SET`](https://oss.redis.com/redisjson/commands/#jsonset) command stores a JSON value at a given JSON Path in a Redis key.\n\nHere, we'll store a JSON document in the root of the Redis key \"`mydoc`\":\n\n```javascript\nimport { createClient } from 'redis';\n\n...\nawait client.json.set('noderedis:jsondata', '$', {\n  name: 'Roberta McDonald',\n  pets: [\n    {\n    name: 'Rex',\n    species: 'dog',\n    age: 3,\n    isMammal: true\n    },\n    {\n    name: 'Goldie',\n    species: 'fish',\n    age: 2,\n    isMammal: false\n    }\n  ]\n});\n```\n\nFor more information about RedisJSON's path syntax, [check out the documentation](https://oss.redis.com/redisjson/path/).\n\n### Retrieving JSON Documents from Redis\n\nWith RedisJSON, we can retrieve all or part(s) of a JSON document using the [`JSON.GET`]() command and one or more JSON Paths.  Let's get the name and age of one of the pets:\n\n```javascript\nconst results = await client.json.get('noderedis:jsondata', {\n  path: [\n    '.pets[1].name',\n    '.pets[1].age'\n  ]\n});\n```\n\n`results` will contain the following:\n\n```javascript\n { '.pets[1].name': 'Goldie', '.pets[1].age': 2 }\n```\n\n### Performing Atomic Updates on JSON Documents Stored in Redis\n\nRedisJSON includes commands that can atomically update values in a JSON document, in place in Redis without having to first retrieve the entire document.\n\nUsing the [`JSON.NUMINCRBY`](https://oss.redis.com/redisjson/commands/#jsonnumincrby) command, we can update the age of one of the pets like this:\n\n```javascript\nawait client.json.numIncrBy('noderedis:jsondata', '.pets[1].age', 1);\n```\n\nAnd we can add a new object to the pets array with the [`JSON.ARRAPPEND`](https://oss.redis.com/redisjson/commands/#jsonarrappend) command:\n\n```javascript\n await client.json.arrAppend('noderedis:jsondata', '.pets', {\n    name: 'Robin',\n    species: 'bird',\n    age: 1,\n    isMammal: false\n  });\n```\n","readmeFilename":"README.md"}