Is there a utility function in Knockout to filter one array based on another array, or will I need to use JavaScript?
First :
var obj1 = [{
"visible": "true",
"id": 1
}, {
"visible": "true",
"id": 2
}, {
"visible": "true",
"id": 3
}, {
"Name": "Test3",
"id": 4
}];
Second :
var obj2 = [ 2,3]
I am looking to filter obj1 based on obj2 and retrieve items from obj1 that are not present in obj2, excluding 2 and 3 based on the object's Id.
Output:
[{
"visible": "true",
"id": 1
}, {
"Name": "Test3",
"id": 4
}];