Answer the question
In order to leave comments, you need to log in
How to decode long JSON request via PHP?
Good afternoon, there is a long JSON request from which you need to display information, but I don’t know how to get, for example, to such a line - "totalChampionKills" (399), where "playerStatSummaryType" = "AramUnranked5x5"
I know what to do like this:
$jsondata = file_get_contents($url);
$data = json_decode($jsondata, true);
$totalChampionKills = $data[...]*
Answer the question
In order to leave comments, you need to log in
foreach ($data['playerStatSummaries'] as $row)
{
if($row['playerStatSummaryType'] == "AramUnranked5x5")
{
echo $row['aggregatedStats']['totalChempionKills'];
} else {
continue;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question