title: content of json array - how to get all elements using js
body: <p>I'm trying to get the content of an array (unknown size) inside a json string.</p>
  
  <p>The following:</p>
  
  <pre><code>var text = '[ { "_id" : { "$oid" : "54426dbfe4b0a1df0eb4a0f6"} , "user" : "fran" , "fecha" : "18/10/2014" , "time" : "7"} , { "_id" : { "$oid" : "54426efae4b00975f860fc06"} , "user" : "elle" , "fecha" : "18/10/2014" , "time" : "9" , "w" : { "w1" : "dog, dok" , "w2" : "cat, kat", "w3" : "pork, porc"}} ]';
  
  obj = JSON.parse(text); 
  document.getElementById("demo").innerHTML =
  //obj[0].score;
  //obj[0].user;
  //obj[1].w.w1;
  for (var i in obj[1].w) {
  console.log(i);
  }
  </code></pre>
  
  <p>How can I loop through and get all values of "w" ?</p>
  
  <p>Regards.</p>