title: how to post multiple div id values from for loop using jquery / javascript
body: <p>I am trying to display values from an array using for loop in jquery on multiple specific divs. but it is displaying only the last record. however each record is shown in the console log. i tried clearing the variable each time in the loop. but no luck. appreciate every help.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var result = [{"title":"red","sellingPrice":"489","productUrl":"https:\/\/dl.website.com\/dl\/gn-cm\/p\/itmew9fze83xwhky"},
  {"title":"blue","sellingPrice":"481","productUrl":"https:\/\/dl.website.com\/dl\/gn-cm\/q\/itmew9fze83xwhky"},
  {"title":"white","sellingPrice":"482","productUrl":"https:\/\/dl.website.com\/dl\/gn-cm\/r\/itmew9fze83xwhky"},
  {"title":"green","sellingPrice":"492","productUrl":"https:\/\/dl.website.com\/dl\/gn-cm\/s\/itmew9fze83xwhky"},
  {"title":"yellow","sellingPrice":"465","productUrl":"https:\/\/dl.website.com\/dl\/gn-cm\/t\/itmew9fze83xwhky"}];
  
    for(var i = 0; i &lt;= result.length-1; i++) {
     document.getElementById('title').innerHTML =result[i].title;
     document.getElementById('price').innerHTML =result[i].sellingPrice;
     document.getElementById('url').innerHTML =result[i].productUrl;
     }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;div id="container"&gt;
    &lt;div id="title"&gt;&lt;/div&gt;
    &lt;div id="price"&gt;&lt;/div&gt;
    &lt;div id="url"&gt;&lt;/div&gt;
   &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Now one more problem. there are other values in the array such as title, price, url etc. and i use div id to display the same. but since i used append, all the values are put next to each other in the first screen. i wanted each of them against its relevant set. The console.log however display correctly. please help</p>