title: Get image from JSON and put into html div using JavaScript
body: <p>I have some JSON data and I would like to get the image from it and put it into a div somehow, I have tried the following code but it does not work. </p>
  
  <p><strong>JSON</strong></p>
  
  <pre><code>var data={"articles":
      [
    {
          "id": 1,
          "title": "Lorem Ipsum is simply dummy",
          "sub": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text.",
          "auth": "Latin text",
          "image": "http://placehold.it/350x150"
        },
          {
          "id": 2,
          "title": "Lorem Ipsum is simply dummy",
          "sub": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text.",
          "auth": "Latin text",
          "image": "http://placehold.it/350x150"
        },
        {
          "id": 3,
          "title": "Lorem Ipsum is simply dummy",
          "sub": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text.",
          "auth": "Latin text",
          "image": "http://placehold.it/350x150"
        },
        {
          "id": 4,
          "title": "Lorem Ipsum is simply dummy",
          "sub": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text.",
          "auth": "Latin text",
          "image": "http://placehold.it/350x150"
    }
  ]}
  </code></pre>
  
  <p><strong>JAVASCRIPT</strong></p>
  
  <pre><code>data.articles.forEach( function(obj) {
    var img = new Image();
    img.src = obj.image_url;
  document.getElementById("image_url_1").innerHTML=data.articles[1].image_url;
  });
  </code></pre>
  
  <p><strong>HTML</strong> (images go into separate div ids as follows: </p>
  
  <pre><code>&lt;div id="image_url_1"&gt;&lt;/div&gt;
  &lt;div id="image_url_2"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>The images will need to go in separate div ids. I don't know what I am doing wrong? </p>