title: How to iterate through a nested object in a JSON with nodejs?
body: <p>I have this JSON:</p>
  
  <pre><code>{ 
      "USD" : {"15m" : 559.07, "last" : 559.07, "buy" : 559.07, "sell" : 562.39,  "symbol" : "$"},
      "CNY" : {"15m" : 3431.69912796, "last" : 3431.69912796, "buy" : 3431.69912796, "sell" : 3452.0780449199997,  "symbol" : "¥"}
  }
  </code></pre>
  
  <p>Using nodejs, I've been trying to iterate through and return any of the members of the nested object. Assuming I wanted to get the member "last", I tried the following. However, I get "undefined". How should I access these members correctly?</p>
  
  <pre><code>        var bcData = JSON.parse(body);
          for (var key in bcData) {
              console.log(key + ": " + key.last + '\n');
          }
  </code></pre>