title: Node.js - How do I retrieve the value of an element within an object/array
body: <p>I am not sure if I have used the correct terminology within the title, but here is the raw result that I want to retrieve data from.</p>
  
  <pre><code>{ items:
     [ { name: 'keydose',
         keys: 69,
         cid: 0,
         $created': '2015-06-21T19:20:38.833Z',
     '   $updated': '2015-06-21T19:20:38.833Z' } ] }
  </code></pre>
  
  <p>This is created via the use of the twitch-irc-db module with the twitch-irc library for node.js, the output above is received by doing this:</p>
  
  <pre><code>db.where('users', {name: user.username}).then(function(result) {
      console.log(result);
  });
  </code></pre>
  
  <p>I've tried using console.log(result.items.cid), console.log(result.items.cid[0]) and console.log(result.items.cid.valueOf()) to get the value of cid from the database but I have no clue what else to try, I've been googling for a long time and just can't find anything.</p>
  
  <p>Thanks for your time :)</p>