How to combine several objects into one array?
res=[] VK.api('groups.search', search_params, function (data) { if (data.response) { $.each(data.response,function(i,e){ if(typeof(e)=="object"){ res.push(e); } console.log(data) // object1{},object2{},object3{} и тд }) }
Object.assignto help you. EitherArray.prototype.push- Dmitriy Simushevres=[]; // .... - Grundyres={}, butres=[]- Dmitriy Simushev