var arr = ['1', '2', '3']
var part = {}
var partContents = []
arr.map(function(i){
partContents.push({ obj: i })
part['text'] = partContents
})
console.log(part);
Is there a way to create separate arrays with the same key name 'text' for each object in the loop instead of combining all objects into a single array as my current code does?