$jsonArr='{
"USD" : {"15m" : 93.89699, "last" : 93.89699, "buy" : 93.25001, "sell" : 93.89698, "24h" : 84.3, "symbol" : "$"},
"CNY" : {"15m" : 573.0, "last" : 573.0, "buy" : 563.76252, "sell" : 588.11678, "24h" : 572.65, "symbol" : "¥"},
"JPY" : {"15m" : 9100.0, "last" : 9100.0, "buy" : 9100.0, "sell" : 9150.0, "24h" : 8240.81, "symbol" : "¥"},
"SGD" : {"15m" : 115.20412, "last" : 115.20412, "buy" : 112.64417, "sell" : 117.51034},
"SLL" : {"15m" : 23207.99, "last" : 23207.99, "buy" : 23207.99, "sell" : 23207.99, "24h" : 23207.99, "symbol" : "L$"}
}';
print_r(json_decode($jsonArr));
出力
stdClass Object
(
[USD] => stdClass Object
(
[15m] => 93.89699
[last] => 93.89699
[buy] => 93.25001
[sell] => 93.89698
[24h] => 84.3
[symbol] => $
)
[CNY] => stdClass Object
(
[15m] => 573
[last] => 573
[buy] => 563.76252
[sell] => 588.11678
[24h] => 572.65
[symbol] => ¥
)
[JPY] => stdClass Object
(
[15m] => 9100
[last] => 9100
[buy] => 9100
[sell] => 9150
[24h] => 8240.81
[symbol] => ¥
)
[SGD] => stdClass Object
(
[15m] => 115.20412
[last] => 115.20412
[buy] => 112.64417
[sell] => 117.51034
)
[SLL] => stdClass Object
(
[15m] => 23207.99
[last] => 23207.99
[buy] => 23207.99
[sell] => 23207.99
[24h] => 23207.99
[symbol] => L$
)
)
これにより、最後に求めたものが得られます
$decodeArr = json_decode($jsonArr);
echo end($decodeArr->SLL);