You need to filter one array based on another array. Is there a disposal function in the knockout? otherwise i need to go with javascript
First:
var obj1 = [{ "visible": "true", "id": 1 }, { "visible": "true", "id": 2 }, { "visible": "true", "id": 3 }, { "Name": "Test3", "id": 4 }];
The second:
var obj2 = [ 2,3]
Now I need to filter obj1 based on obj2 and return elements from obj1 that are not in obj2 omittng 2,3 in the above data (Comparison on object 1 Id )
output:
[{ "visible": "true", "id": 1 }, { "Name": "Test3", "id": 4 }];
source share