-1

I want to parse this json object in javascript and have to obtain the values of key pass in string format.

{
   "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"
      }
   ]
}
apomene
  • 14,282
  • 9
  • 46
  • 72

1 Answers1

0

If you are asking in a general sense (no links to Worklight) I would look at other answers:

How do I iterate over a JSON structure?

JavaScript loop through json array?

How do I loop through or enumerate a JavaScript object?

In Worklight, if your example is the response of a Worklight adapter, the response will be in a property called invocationResult.

See also https://www.ibm.com/developerworks/community/blogs/worklight/entry/handling_backend_responses_in_adapters?lang=en

Community
  • 1
  • 1
Nathan H
  • 48,033
  • 60
  • 165
  • 247
  • actually im getting this json from invoking the sqladapter from which i want to obtain the all values of the pass in string form in the java script – user3510619 Apr 08 '14 at 12:05
  • 1
    I'm not clear on what you are missing. What is the issue exactly? – Nathan H Apr 08 '14 at 13:24