I have 2 arrays that i don't know the name.
foo: [{foo1: foo}, {foo2: fooo}]
bar: [{bar1: bar}, {bar2: barr}]
and, using php, i need the output myObject:{foo1: foo}, {foo2: fooo}, {bar1:bar}, {bar2:barr}
Any ideas?
public function searchNeighborhoods(Request $request) { if($request->has('cities')){ $data = []; $cities = $request->get('cities'); foreach($cities as $city){ $res = $this->client->request('GET', $this->url . "neighborhoods", ["query" => 'foo:bar' } return bag($data); }}