I have a javascript function that takes an object and remaps all of its key names to something else that I have defined.
Here is the function:
var nameMap = {
SubmissionID: 'SubmissionID',
MetaCreatedDate: 'Date',
MetaCreatedDate_: 'MetaCreatedDate_',
Program: 'Program',
ViewedByInvestigator: 'Viewed',
DateInvestigatorViewed: 'DateInvestigatorViewed',
CaseID: 'CaseID',
SecondaryReviewer: 'SecondaryReviewer',
Investigator: 'Investigator',
InvManager: 'Manager',
InvSrManager: 'SrManager',
WorkflowAction: 'WorkflowAction',
Adjacency: 'Adjacency',
Jurisdiction: 'Jurisdiction',
Actions: 'Actions',
Note: 'Note',
recid: 'SubmissionID'
}
// Converted names
data = data.map(item => renameKeys(item, nameMap));
This function works great for Chrome/Firefox but I am having issues getting it to work in IE. I am receiving a syntax error on the line that is invoking the function.
Does IE not support mapping or is it written in a supported format? How can I account for this in IE?