Within my possession are 2 arrays:
var array1 =
[{"name":"abc", "url":"http:://example1.com"},
{"name":"cde", "url":"http:://example2.com"},
{"name":"fgh", "url":"http:://example3.com"}];
var array2 =
[{"id":"1", "url":"http:://example1.com"},
{"id":"2", "url":"http:://example2.com"}];
My desire is to sift through array1 based on the url values present in array2, but I seem to be struggling with the methodology.
Kudos to VLAZ for the clarification on Array Definition. (I was under the impression my example would involve a 2-dimensional array).
While I am aware of the multi-object item in array2, I have employed the array2 reduction method to create new arrays. Yet, I yearn to delve deeper into the process of direct filtering between 2 arrays with multiple object items.
let array2b = array2.reduce((acc, cur) => [...acc, cur.url], []);
var filtered = array1.filter(item => array2b.includes(item.url));
UPDATE: After a day of fruitless searching, I unexpectedly stumbled upon a solution here: Filter array of objects with another array of objects . Apologies to all for the oversight