How can i get the values of the field password from this json in php
[
{
"rid":"#145:0",
"version":1,
"oClass":"Login",
"oData":{
"Password":"hacker007",
"role":null,
"Name":"Nijeesh Joshy",
"Email":"nijeesh4all@gmail.com"
}
}
]
this is my code
$json = '[
{
"rid":"#145:0",
"version":1,
"oClass":"Login",
"oData":{
"Password":"hacker007",
"role":null,
"Name":"Nijeesh Joshy",
"Email":"nijeesh4all@gmail.com"
}
}
]';
$json = json_decode($json,true);
echo $json[0]->oData->Name;
I am getting this error
Notice: Trying to get property of non-object