There's JSON data with Offers
foreach($json['offers'] as $offer)
Every offer has data that contains country
"countries":[{"name":"United States","code":"US"}]
How do I remove all the offers if they dont include for example "US"?
As far as I understand I should use array_map right? But how do I tell it to remove those that doesn't include value instead of those who does include value I define?
array_map()is for changing (all) data. You wantarray_filter().