Looking for suggestions on creating a filter in one list based on another list
How can I handle filtering an array within a list by searching in another array?
For example...
myArray = [
{
"name": "Item-A", "tags":
["Facebook", "Google"]
},
{
"name": "Item-B", "tags":
["Facebook", "Google", "Apple"]
},
{
"name": "Item-C", "tags":
["Apple"]
},
];
//array for filter
paramsFilter = ["Facebook", "Apple"];
//expected result
[
{
"name": "Item-B", "tags":
["Facebook", "Google", "Apple"]
},
{
"name": "Item-C", "tags":
["Apple"]
},
]