<?php
$str = '[{"object":"list","hasMore":true,"limit":10,"offset":0,"data":[{"city":{"object":"city","id":15873,"ibgeCode":"3550308","name":"São Paulo","districtCode":"00","district":"São Paulo","state":"SP"}},
{"city":{"object":"city","id":15718,"ibgeCode":"5200050","name":"Abadia de Goiás","districtCode":"05","district":"Abadia de Goiás","state":"GO"}},
{"city":{"object":"city","id":9853,"ibgeCode":"3100104","name":"Abadia dos Dourados","districtCode":"05","district":"Abadia dos Dourados","state":"MG"}}
]}]' ;
foreach ( $json [ 0 ] [ 'data' ] as $item ) {
echo $item [ 'city' ] [ 'name' ] . ' - ' . $item [ 'city' ] [ 'state' ] . PHP_EOL;
}
PD9waHAKCgokc3RyID0gJ1t7Im9iamVjdCI6Imxpc3QiLCJoYXNNb3JlIjp0cnVlLCJsaW1pdCI6MTAsIm9mZnNldCI6MCwiZGF0YSI6W3siY2l0eSI6eyJvYmplY3QiOiJjaXR5IiwiaWQiOjE1ODczLCJpYmdlQ29kZSI6IjM1NTAzMDgiLCJuYW1lIjoiU8ODwqNvIFBhdWxvIiwiZGlzdHJpY3RDb2RlIjoiMDAiLCJkaXN0cmljdCI6IlPDg8KjbyBQYXVsbyIsInN0YXRlIjoiU1AifX0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyJjaXR5Ijp7Im9iamVjdCI6ImNpdHkiLCJpZCI6MTU3MTgsImliZ2VDb2RlIjoiNTIwMDA1MCIsIm5hbWUiOiJBYmFkaWEgZGUgR29pw4PCoXMiLCJkaXN0cmljdENvZGUiOiIwNSIsImRpc3RyaWN0IjoiQWJhZGlhIGRlIEdvacODwqFzIiwic3RhdGUiOiJHTyJ9fSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ImNpdHkiOnsib2JqZWN0IjoiY2l0eSIsImlkIjo5ODUzLCJpYmdlQ29kZSI6IjMxMDAxMDQiLCJuYW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