Here is my php file
<?php
$myObj = array(
"name"=>"John" ,
"age"=>"30" ,
"post"=>[
"title"=>"what is WordPress" ,
"excerpt"=>"WordPress is a famous blogging cms" ,
"description"=>"WordPress is a famous which is used by million bloggers",
"meta"=>[
"timing"=>["time"=>"3pm", "date"=>"3Jan"]
]
]
);
$obj = json_encode($myObj);
echo $obj;
?>
And it returns like this.
{"name":"John","age":"30","post":{"title":"What is WordPress","excerpt":"WordPress is an blogging cms","description":"WordPress is an blogging cms used by million of bloggers","meta":{"time":"3pm","date":"3Jan"}}}
I used HttpUrlConnection and this catch the JSON. When I request for the title, excerpt, the description I get the expected result.
But I want to get the result of "time" of meta->timing section.
Please help me how to get it. I don't know if it is possible or not.
I think adding the Java code is not so much important So hadn't added it.
timingproperty of themetaobject but there's no such property. You should instead read thetimeproperty as suggested by vikas kumar.