1
これは私のJSON
配列、私は上記の配列にposition
の数をカウントしてヘルプを取得したいと思いカウント
[{
"textinput": [{
"position": 0,
"dependency": "no",
"id": 0,
"label": "single1",
"Itype": "textinput"
}, {
"position": 1,
"dependency": "no",
"id": 1,
"label": "single2",
"Itype": "textinput"
}, {
"position": 2,
"dependency": "no",
"id": 2,
"label": "single3",
"Itype": "textinput"
}, {
"position": 3,
"dependency": "no",
"id": 3,
"label": "single4",
"Itype": "textinput"
}, {
"position": 4,
"dependency": "no",
"id": 4,
"label": "single5",
"Itype": "textinput"
}, {
"position": 5,
"dependency": "no",
"id": 5,
"label": "single6",
"Itype": "textinput"
}]
}]
。
ポジション数がjsonarray.length .... –
ポジションの合計を取得したいのは何ですか?もしそうでなければ、jsonArraylengthが必要です。 –
ない総和が、どのように多くの「位置」その後、あなたの全体のJSONを入れ –