How to get data for each playlist ( in Laravel 5.2

Im getting data from arena stats.
For example if I want to get total games won in Arena I will do this:

> $array[‘GamesWon’] = $playerStats->Results[0]->Result->ArenaStats->TotalGamesWon;

And when I (var_dump) it it will give me 54

I want to know how to get data for a particular playlist, but I cant get it to work. Right now Im doing this:

> $d = $playerStats->Results[0]->Result->ArenaStats->ArenaPlaylistStats;
> dd($d);

And it is giving me this result. (For one Playlist, just for shortness):

> {<a class=“sf-dump-ref sf-dump-toggle”>#198 ▼</a> +“PlaylistId”: “2323b76a-db98-4e03-aa37-e171cfbdd1a4” +“MeasurementMatchesLeft”: 0 +“HighestCsr”: {<a class=“sf-dump-ref sf-dump-toggle”>#197 :arrow_forward:</a>} +“Csr”: {<a class=“sf-dump-ref sf-dump-toggle”>#195 :arrow_forward:</a>} +“CsrPercentile”: 6 +“TotalKills”: 171 +“TotalHeadshots”: 162 +“TotalWeaponDamage”: 7836.3329143524 +“TotalShotsFired”: 1572 +“TotalShotsLanded”: 396 +“WeaponWithMostKills”: {<a class=“sf-dump-ref sf-dump-toggle”>#210 :arrow_forward:</a>} +“TotalMeleeKills”: 4 +“TotalMeleeDamage”: 128.23572653159 +“TotalAssassinations”: 0 +“TotalGroundPoundKills”: 0 +“TotalGroundPoundDamage”: 0.0 +“TotalShoulderBashKills”: 0 +“TotalShoulderBashDamage”: 0.0 +“TotalGrenadeDamage”: 0.0 +“TotalPowerWeaponKills”: 0 +“TotalPowerWeaponDamage”: 0.0 +“TotalPowerWeaponGrabs”: 0 +“TotalPowerWeaponPossessionTime”: “PT0S” +“TotalDeaths”: 105 +“TotalAssists”: 15 +“TotalGamesCompleted”: 11 +“TotalGamesWon”: 8 +“TotalGamesLost”: 3 +“TotalGamesTied”: 0 +“TotalTimePlayed”: “PT48M26.4570633S” +“TotalGrenadeKills”: 0 +“MedalAwards”: array:15 [<a class=“sf-dump-ref sf-dump-toggle”>:arrow_forward:</a>] +“DestroyedEnemyVehicles”: +“EnemyKills”: +“WeaponStats”: array:4 [<a class=“sf-dump-ref sf-dump-toggle”>▶</a>] +“Impulses”: +“TotalSpartanKills”: 171 }

How would I grab for example total kills in that playlist using the method Im using above?

So sounds like you have just a small misunderstanding or learning to do with PHP. Your first line is simply a mix of array and object notation. So you are playing saying "In the $playerStats variable give me the Result array. Inside the Result array give me the first element ([0]). Then simply into Result -> ArenaStats -> TotalGamesWon.

Why this doesn’t work for your below method is because there are multiple Arena playlists. At this point you can do a loop over those Playlists and check the PlaylistId for whatever one you are looking for and return that playlist. The playlists never show in the same order so you can’t rely on an array index.

How would a get the Playlist ID though?

> $arena = $playerStats->Results[0]->Result->ArenaStats->ArenaPlaylistStats;
> // Tema arena Playlist ID Example
> $TeamArena = ‘c98949ae-60a8-43dc-85d7-0feb0b92e719’;
> foreach($arena->PlaylistId as $TeamArena) {
> return $arena
> }

Please, Please help me, I made a good app, but I just cant figure this part out.