Issue with Javascript attempting to store result of callback into an object -


i doing rss feed scrape , taking values of data , placing them object.

one of keys of object have attempted attach method call takes key/value pair same object , pass , return result of methods call function.

i having issues.

any ideas?

for(var z = 0; z < submit_movies_feeddata.items.length; z++){   sixninecontent = {     title : submit_movies_feeddata.items[z].title,     pubdate : submit_movies_feeddata.items[z].pubdate,     image : submit_movies_feeddata.items[z].image,     link : submit_movies_feeddata.items[z].link,     adfly : adfly.short(this.link,function(urladfly){       return urladfly;     });   }; } 

adfly.short asynchronous function, callback won't work way you've written it. need wait result before can add object.


Comments