jeudi 30 mars 2017

Displaying JSON object on blade template

I'm trying to display a JSON object that is returned to my blade template that should look the output below

2007 | Kanye | UltralightBeam  
2008 | JayZ  | 99 Problems

JSON looks like this

{
    "2007":{
        "name" : "Kanye",
        "song" : "UltralightBeam"
    },
    "2008":{
        "name" : "JayZ",
        "song" : "99 Problems"        
    }
}

So far I have something like this that shows the name and song

@foreach($data['data_obj'] as $obj)
     |  
@endforeach

But I'm just not sure how I can get it to show the year as well?

Any guidance would be appreciated. Thank you!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire