i have an array like this coming back response from the server:
[ \"111\", \"1010\", \"111\", \"1010\", \"1010\" ]
i want t
You could map a short hand property.
var array = ["111", "1010", "111", "1010", "1010"], result = array.map(branch => ({ branch })); console.log(result);