[HELP] Count Array
Posted: Sun Dec 20, 2015 2:53 am
HI...
i have json like this:
how to count depart[key]['segment'] ?
i try using , but now work...
thx...
i have json like this:
Code: Select all
{
"depart":[
{
"segment":[
[
{
"airline_code":"SJ",
"fno":"SJ598",
"class":"X",
"seat":null,
"from":"CGK",
"to":"TTE",
"std":"00:05",
"sta":"07:05",
"price":"1,211,000",
"order_key":":-:S:CGK:AMQ:U2s5VlVrNUZXUT09"
}
],
[
{
"airline_code":"SJ",
"fno":"SJ694",
"class":"X",
"seat":null,
"from":"TTE",
"to":"AMQ",
"std":"12:45",
"sta":"13:35",
"price":"379,000",
"order_key":":-:S:CGK:AMQ:U2s5VlVrNUZXUT09"
}
]
]
},
i try using
Code: Select all
depart[key]['segment'].lengththx...