fork download
  1. <?php
  2.  
  3. $string = '{
  4. "pedidos": [{
  5. "feito_data": "2017-08-07",
  6. "valor": 40.0
  7. }]
  8. }';
  9.  
  10. $jsonObject = json_decode($string);
  11.  
  12. var_dump(reset($jsonObject->pedidos)->feito_data);
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
string(10) "2017-08-07"