title: Iterate over json hash in javascript
body: <p>Json:</p>
  
  <pre><code>{
   "comments":[
      {"id":1,"author_name":null,"comment_text":null,"url":"http://localhost:3000/comments/1.json"},
      {"id":2,"author_name":null,"comment_text":null,"url":"http://localhost:3000/comments/2.json"},{"id":3,"author_name":"Yerassyl","comment_text":"Hello world!","url":"http://localhost:3000/comments/3.json"},
      {"id":4,"author_name":"Yerassyl","comment_text":"hi there","url":"http://localhost:3000/comments/4.json"}
   ]
  }
  </code></pre>
  
  <p>How to iterate over each comment in comments. I want something like that:</p>
  
  <pre><code>//pseudocode
  comments.each(key,value){
  // do something
  }
  </code></pre>
  
  <p>I tried map, but map is for arrays. </p>
  
  <p>EDIT:
  If i delete root node 'comments' i can use .map:</p>
  
  <pre><code>var commentNodes = this.props.comments.map(function(comment,index){
        });
  </code></pre>
  
  <p>Ignore this.props, it is actually React.js.<br>
  console.log(this.props.comments) returns my json objects with root node 'comments'</p>