我正在尝试在我的项目中使用一个 json 文件。我在以下结构中有一个 Json 文件,我成功访问了 json 数组“business”,但现在我想访问 business_cat 和 business_cat、cat 1 和 cat 2。怎么能我访问这些值?
{
"business":[
{
"id":"13",
"category":"Dinner",
"subcategory":"",
"name_eng":"dinner 1",
"name_arab":"dinner 1",
"mobile":"12345",
"address":"not now",
"logo":"1.gif",
"contact":"Call",
"open_time":" ",
"close_time":" "
}
],
"business_cat":[
[
"cat 1",
{
"name":"dish 1",
"id":"7",
"name_arab":"dish1",
"price":"200",
"logo":"laptop.jpeg"
},
{
"name":"dish 2",
"id":"8",
"name_arab":"dish 2",
"price":"123789",
"logo":"micky.jpg"
},
{
"name":"qaz",
"id":"10",
"name_arab":"zaq",
"price":"12",
"logo":"watch.jpg"
},
{
"name":"wsx",
"id":"11",
"name_arab":"xsw",
"price":"12",
"logo":"micky.jpg"
},
{
"name":"zxc",
"id":"12",
"name_arab":"vcxz",
"price":"34",
"logo":"camera.jpg"
}
],
[
"cat2",
{
"name":"d1",
"id":"9",
"name_arab":"d1",
"price":"300",
"logo":"watch.jpg"
}
]
]
}