title: How to access iterator object of a given type
body: <p>I am writing a client in Hyperledger Fabric application. There, for one query, I am getting an object which I don't know how to access. When I printed the object into the console</p>
  
  <pre><code> console.log(result);
  </code></pre>
  
  <p>it gives me the following value.</p>
  
  <pre><code>[object Object]
  </code></pre>
  
  <p>According to <a href="https://fabric-shim.github.io/release-1.4/fabric-shim.ChaincodeStub.html#getHistoryForKey__anchor" rel="nofollow noreferrer">documentation</a>, I am getting <code>HistoryQueryIterator object</code></p>
  
  <p>How can I access, iterate this object in my nodejs application?</p>
  
  <p>In the debig mode, I can it is a buffer of ints.</p>