I am trying to align the data in two arrays by using this block of code.
var items = viewModel.Date1;
var items2 = viewModel.Date2;
items = items2.map( row =>
//checking for a matching row in items
items.filter( r => r.theString == row.theString).length == 0 ?
//if not found, fill with zeros
{theString:0, theCount:0} :
//return the items' row if there is a match
items.filter( r => r.theString == row.theString)[0] );
I encountered a Syntax error in IE when using =>
.
How can I modify this code to work seamlessly across Firefox, Chrome, and IE?