I have an array like this,
var items = ['1','2','3']
and i want the output as newItems = [{'id':1}.{'id':2},{'id':3}];
newItems = [{'id':''}]
for(var i = 0;i<items.length;i++){
newItems[i].id = type[i];
}
Can anyone please help me.Thanks.