I am trying to parse an HGETALL object in Node.js.
In Redis CLI:
> HGETALL userList
returns
1) "19578616521094096601" 2) "User 1" 3) "1682930884780137383" 4) "User 2"
In Node:
var redis = require('redis') , r = redis.createClient(); console.log(r.HGETALL('userList'));
returns
true
I would like to parse a userList object as JSON or an array, but I cannot figure out how to extract data from it.
source share