I have this array which contains objects:
var tmp_array = [ { headline: \"Test\", text: \"Test text\", send_at: \"test date\" } ];
Now in the
Try forEach method instead of map:
map
var WholeNews =[]; tmp_array.forEach(function(news, i){ WholeNews.push( {news.headline} {news.text} ); });
And note from where you can get the i index..
i