dynamically update elements of array using javascript
<p>I want to update elements into an array from an $.each loop but it loads them incorrectly into the array. it puts all users into one element, all dates into one element and so on 
Here is the code:</p>

<pre><code>    var array = [{
      user: "",
      user_id: "",
      date: "",
      profile_img: "",
      text: "",
      contentString: "",
      url: "",
      location: ""
    }];
    $.getJSON("http://search.twitter.com/search.json?q=%23euronews&amp;rpp=5&amp;include_entities=true&amp;result_type=mixed&amp;callback=?",

    function (data) {
      $.each(data.results, function (i, item) {
        var user = item.from_user;
        var user_id = item.from_user_id;
        var date = item.created_at;
        var profile_img = item.profile_image_url;
        var text = item.text;
        var contentString = text;
        var url = (item.entities.urls.length &gt; 0 ? item.entities.urls[0].url : '');
       console.log(i);
       array.user=user;
       array.user_id=user_id;
       array.date=date;
       array.profile_img=profile_img;
       array.text=text;
       array.contentString=contentString;
       array.url=url;

      });
      console.log(array);
       });
</code></pre>

<p>what shall i do to fix this ?</p>
