0
votes

Function.map throwing console error while performing $.map function. where result.extraIds includes 300k records.

$scope.extraIds = $.map(result.extraIds, function (item) {
     return item.id;
});

This error internally stopping other functionality.

How can I handle this scenario?

1
Can you add sample data here? Or create a fiddle? - Tushar
I create an array of 500000 elements and extracted id from it using Array.map and it's working fine. FIddle - Tushar

1 Answers

0
votes

Problem got resolved by using JavaScript map function instead of jQuery map.

$scope.extraIds = result.extraIds.map(function (item) {
    return item.id;
});