title: How to chain returns in nodejs with ioredis?
body: <p>I'm using <a href="https://github.com/luin/ioredis" rel="nofollow">ioredis</a> and I would like to return the path and value in the example below all the way up to the anonymous function.</p>
  
  <pre><code>console.log(
      function (jsonGraphArg) {
          return Redis.hget(jsonGraphArg[0], jsonGraphArg[1], function(error, result){
               result = JSON.parse(result);
               return {
                   path: [jsonGraphArg[0], jsonGraphArg[1], jsonGraphArg[2][0]],
                   value: result[jsonGraphArg[2][0]]
               };
          });
      }
  );
  </code></pre>
  
  <p>I would expect the outcome to be something like this in the <code>console.log()</code>:</p>
  
  <pre><code>{
      path: "something",
      value: "something else"
  }
  </code></pre>
  
  <p>But instead it gives me:</p>
  
  <pre><code>{
    _bitField: 1,
    _fulfillmentHandler0: [Function: successAdapter],
    _rejectionHandler0: [Function: errorAdapter],
    _progressHandler0: undefined,
    _promise0: [Function],
    _receiver0: [Circular],
    _settledValue: undefined
  }
  </code></pre>