I have 2 arrays that I'm working with. The first array comes from the data of a CSV file and the other is a response from an API.
Is it possible to filter array 2 by using matching values from array 1?
Array 1 Example
[
["B00CEEZ57S"],
["B002QJZADK"],
["B001EHL2UK"],
["B003FSTNB6"],
]
Array 2 Example
[
[
"name" => "Jonathan Franzen: Purity (Hardcover); 2015 Edition",
"ASIN" => "B002QJZADK"
],
[
"name" => "Cardinal Gates Outdoor Child Safety Gate, Brown",
"ASIN" => "B00CE8C7SO"
],
[
"name" => "Sauder Edge Water 71.88\" Bookcase Estate Black Finish",
"ASIN" => "B001EHL2UK"
],
[
"name" => "The Pioneer Woman 82695.03R Cowboy Rustic 8\" Rosewood Handle Can Opener, Scis...",
"ASIN" => "B015LU7GPU"
]
]
These rows should be kept:
[
'name' => 'Jonathan Franzen: Purity (Hardcover); 2015 Edition',
'ASIN' => 'B002QJZADK',
],
[
'name' => 'Sauder Edge Water 71.88" Bookcase Estate Black Finish',
'ASIN' => 'B001EHL2UK'
]