Good day,
I'm fetching my data directly from and API endpoint. I was able to get the id but how can I access "type":"participant", specifically the skillTier?
Here's my code but it's throwing an error: NOTICE: UNDEFINED INDEX: SKILLTIER IN C:\XAMPP\HTDOCS\VGAPP\INDEX.PHP ON LINE 219
if(is_array($finaljson) || is_object($finaljson)){
if(!empty($finaljson['included']) && $finaljson['included'] !== ""){
foreach ($finaljson['included'] as $key => $value) {
if(!empty($value['attributes']['name']) && $value['attributes']['name'] === $username){
$userid = $value['id'];
$skillTier = $value['skillTier'];
}
}
Here is the json data:
https://gist.github.com/kamaelxiii/18ef0c1600330b98717b96db00532d6a