[Solved] filtering json data in php laravel
You can json_decode that json string and then use array_filter method to filter regions $regions = json_decode(‘{“regions”: [ { “id”: 1, “name”: “Region 1”, “state_id”: 1, “areas” :[ { “id”: 1, “name”: “area 1”, “region_id”: 1 },{ “id”: 2, “name”: “area 2”, “region_id”: 1 }] },{ “id”: 2, “name”: “Region 2”, “state_id”: 1, “areas” :[{ … Read more