How to get the low value of the following api
:
[{"idreg":"257052","code":"USD","codein":"BRL","name":"D\u00f3lar Comercial",
"high":"3.4026","pctChange":"1.143","open":"0","bid":"3.3703","ask":"3.3713",
"timestamp":"1481828340000","low":"3.367","notFresh":"0","varBid":"0.0381",
"create_date":"2016-12-15 17:30:02"}]
I do not quite understand what the path rules are for json
but I tried the following way:
<?php
$json_file = file_get_contents("https://economia.awesomeapi.com.br/json/USD-BRL/1");
$dados = json_decode($json_file);
echo $dados->low;
?>
What am I doing wrong?