title: Iterate through broken JSON object
body: <p>I am currently attempting to write a script to iterate through a JSON object (which unfortunately I cannot change the structure of). </p>
  
  <p>However I belive the JSON is not valid as there is no Key. </p>
  
  <h2>This is the Structure of my JSON:</h2>
  
  <pre><code>{
      "0": {
          "name": "You",
          "message": "dwd"
      },
      "1": {
          "name": "You",
          "message": "asa"
      },
      "2": {
          "name": "You",
          "message": "this is the message that the user is faced with boi"
      },
      "3": {
          "name": "You",
          "message": "asas"
      },
      "4": {
          "name": "You",
          "message": "asasasas"
      },
      "5": {
          "name": "You",
          "message": "asas"
      },
      "6": {
          "name": "You",
          "message": "sdsd"
      },
      "7": {
          "name": "You",
          "message": "asdfg"
      },
      "8": {
          "name": "You",
          "message": "asas"
      },
      "9": {
          "name": "You",
          "message": "asas"
      }
  }
  </code></pre>
  
  <p>This is the current script that I have, however this does not seem to iterate through this object.</p>
  
  <pre><code>for (var key in greetings){
              name  = greetings[key].name
              console.log(name)
              msg = greetings[key].message
              tag = '&lt;ul&gt;'+name+' wrote: '+message+'&lt;/ul&gt;'
              ul = ul + tag
          }
  </code></pre>
  
  <p>Any help would be great</p>
  
  <p>EDIT: </p>
  
  <p>Here is some more information. The greetings object is sent from a server and is fetched via a XMLHTTPRequest, as seen below</p>
  
  <pre><code>xhttp.onreadystatechange = function() {
              if (this.readyState == 4 &amp;&amp; this.status == 200) {
                  greetings = JSON.parse(xhttp.responseText);
                  console.log(greetings);
              }
          };
  </code></pre>
  
  <p>As for the loop, the varaible reassignment is so that the HTML (I want to make each object in this list its own tag)</p>