Link to home
Start Free TrialLog in
Avatar of chand pb
chand pbFlag for United States of America

asked on

how to parse a JSON object --JavaScript

Hello ,
  I have complex json object that I need some help to parse..

I want all the QE elements value
e.g

Id = 21,
Label =First Name,
Value = FNl
-----------------
 Id:= 22,
Label = Last Name
Value": LN

[
  {
    "CanAdd": false,
    "QG": [
      {
        "Id": 3,
        "Name": "Name",
        "Q": [
          {
            "Id": 1,
            "Name": "First Name",
            "QE": [
              {
                "Id": 21,
                "Label": "First Name",
                "Value": FN
              }
            ],
            "Version": "1",
            "Display": false
          },
          {
            "Id": 2,
            "Name": "Last Name",
            "QE": [
              {
                "Id": 22,
                "Label": "Last Name",
                "Value": LN
              }
            ],
            "Version": "1",
            "Display": false
          }
        ],
        "Version": "1",
        "Display": false
      }
    ]
  },
  {
    "CanAdd": false,
    "QG": [
      {
        "Id": 30,
        "Name": "address",
        "Q": [
          {
            "Id": 1,
            "Name": "address",
            "QE": [
              {
                "Id": 21,
                "Label": "address1",
                "Value": AD1
              }
            ],
            "Version": "1",
            "Display": false
          }
        ],
        "Version": "1",
        "Display": false
      }
    ]
  },
  {
    "CanAdd": false,
    "QG": [
      {
        "Id": 30,
        "Name": "phone",
        "Q": [
          {
            "Id": 1,
            "Name": "phone1",
            "QE": [
              {
                "Id": 21,
                "Label": "phone1",
                "Value": PH1
              }
            ],
            "Version": "1",
            "Display": false
          }
        ],
        "Version": "1",
        "Display": false
      }
    ]
  }
]

                                  

Open in new window

SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial