Adding a title field in JSON output data
Hello
I was trying to output my JSON data as below format with a tile/index marking "hadiths"
[json]
{
"hadiths": [
{
"hadithID": 87555,
"bookID": 67,
"chapterID": 30284,
"sectionID": 918,
"hadithNumber": 1,
"hadithNumber2": null,
"hadithNumber3": null,
},
{
[/json]
But as per my present code the output is showing as like below;
-------------------------------
[json]
[
{
"hadithID": 87555,
"bookID": 67,
"chapterID": 30284,
"sectionID": 918,
"hadithNumber": 1,
"hadithNumber2": null,
"hadithNumber3": null,
},
{
[/json]
Kindly help me to get a output with a Title/Index name at the starting of JSON output data. Attaching present php file for the present code