I have the following angularjs function which works in Chrome, FF, Safari, but not in IE11:
var dataListDecision = [];
$scope.readDataList = function ()
{
dataListDecision = results.data.map(el => ({
idApplication: el['Application Reference'],
field: 'Decision',
newValue: el['Decision Outcome']
}))
};
In IE11I get the console error of "SCRIPT1002: Syntax error" and it highlights the "=>".
I searched for a solution and found this question/answer: Error with Array.map() in IE11
But this doesn't address the mapping I'm doing of selecting multiple fields from an existing JSON Object array to create another JSOn Object array.
I've tried to implement this solution in the following way:
dataListDecision = results.data.map(function (el) {
return
({
idApplication: el['Application Reference'],
field: 'Decision',
newValue: el['Declaration Outcome'],
idUser: '0'
})
})
This stops any errors, but results in the array being filled with the correct number of objects, but each object contains no data and is just "undefined".
returnthe created object in a fullfunction.