我想在json
中解析这个javascript
对象,并且必须以字符串格式获取密钥传递的值。
{
"isSuccessful": true,
"resultSet": [
{
"name": "a",
"pass": "123",
"time_stamp": "2014-04-07T10:13:17.000Z"
},
{
"name": "chetan",
"pass": "123456",
"time_stamp": "2014-04-07T10:13:34.000Z"
},
{
"name": "dileep",
"pass": "456321",
"time_stamp": "2014-04-07T10:13:54.000Z"
},
{
"name": "bnc",
"pass": "654321",
"time_stamp": "2014-04-07T10:19:37.000Z"
}
]
}
答案 0 :(得分:0)
如果您在一般意义上提问(没有指向Worklight的链接),我会查看其他答案:
How do I iterate over a JSON structure?
JavaScript loop through json array?
How do I loop through or enumerate a JavaScript object?
在Worklight中,如果您的示例是Worklight适配器的响应,则响应将位于名为invocationResult
的属性中。