I am currently working with Ionic2 / Angular2
utilizing typescript
. I have encountered an issue while attempting to filter an Array.
The scenario is as follows:
let localTours = [];
...
let newTours = dbTours.filter(x => localTours.indexOf(x) < 0);
localTours.push(newTours);
However, the problem lies in the fact that my localTours
array remains empty. This occurs because the .push
function is being called before the filtering. Do you have any suggestions on how I can resolve this issue?