parsing multi dimensional json array

Discussion in 'jQuery' started by cris02, Nov 6, 2014.

  1. #1
    Can anyone help me how to parse this json string using javascript or jQuery:

    "[{"name":"null","id":"1","isLazy":true,"children":
        [    {"name":"Appliances","id":"2","isLazy":true,"children":
            [
                {"name":"Aircon","id":"4","isLazy":false},
                {"name":"Oven","id":"7","isLazy":false},
                {"name":"Freezer","id":"8","isLazy":false}
            ]
    },
            {"name":"SUV","id":"3","isLazy":true,"children":
                [
                    {"name":"Car1","id":"9","isLazy":false},
                    {"name":"Car2","id":"10","isLazy":false}
                ]
            }
        ]
    }]"
    Code (JavaScript):
    this json came from dynamic record from database. THanks in advance, i hope someone help me.
     
    cris02, Nov 6, 2014 IP