下面是我作爲JSON字符串的內容。在json字符串中查找值
{
"ID_A0001":{"areaID":"A0001","shopID":"SH004","quantity":14},
"ROW_INFO":{"areaID":"VARCHAR","shopID":"VARCHAR","quantity":"INT"},
"ID_A0002":{"areaID":"A0002","shopID":"SH008","quantity":18}
}
我要的是獲得具有ID爲ID_A
即ID_A0001
& ID_A0002
的JSONObject
。
我想用jsonObject.getString("ID_A")
,但這是不可能的。有人能告訴我該怎麼做,以便我能得到如下的結果。
{
"ID_A0001":{"areaID":"A0001","shopID":"SH004","quantity":14},
"ID_A0002":{"areaID":"A0002","shopID":"SH008","quantity":18}
}