Лучше тогда не forEach(), а map():
var positions = [
'Bosh VZHIH-101',
'Ariston WHO-D',
'Atlant Mattel 2016',
'Wirpool FLASH black edition',
'Bosh VH1Z-024'
],
prices = [
10000,
4800,
9200,
2500,
5700
],
obj = positions.map(function(item, index) {
return {'name' : item, 'price' : prices[index]}
})
console.dir(obj)
|