Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

redis json get multiple paths

/* Warning, this won't return the property name
   Ex: key: { foo: 'bar' }
   
  const result = await redisClient.json.get('somekey', {
    path: '$["foo"]'
  })
  
  // result is equal to ['bar']
  
*/
const result = await redisClient.json.get('somekey', {
  path: '$["foo","bar"]'
})

// returns [<fooPropValue>, <barPropValue>]
 
PREVIOUS NEXT
Tagged: #redis #json #multiple #paths
ADD COMMENT
Topic
Name
1+4 =