I have a set over which I am iterating in ES6. I am trying to convert it to its equivalent in ES5. My build is getting failed because of ES6. That\'s why I am converting it
Why not just iterate through the data and map the result with Array#map.
result = deviceList.map(function (item) { return { deviceName: item }; });