I have the following json :-
{
"firstName": "Jhon",
"lastName": "Doe",
"username": "jhon",
"avatar": "localhost/uploads/avatars/default.jpg",
"language": "ar",
"birth_date": "2017-11-22 00:00:00",
"weight_chart": [],
"health_status": {
"id": 130,
"user_id": 258,
"weight": 95,
"height": 171,
},
I decoded the above json
$user = json_decode($response);
Now i am able to print the firstname by using: $user->firstName
My questions is :-
- Can i access the json values without decoding it ?
- How can i access the "health_status" values id, weight ... ?