Hi, I am starting with Javascript and I want to know how I can do dynamically travers of json in javascript? Anybody know? For example I have this json format:var x = {
“condition”: “AND”,
“rules”: [{
“id”: “price”,
“field”: “price”,
“type”: “double”,
“input”: “number”,
“operator”: “less”,
“value”: 10.25
},
{
“condition”: “OR”,
“rules”: [{
“id”: “category”,
“field”: “category”,
“type”: “integer”,
“input”: “select”,
“operator”: “equal”,
“value”: 2
},
{
“id”: “category”,
“field”: “category”,
“type”: “integer”,
“input”: “select”,
“operator”: “equal”,
“value”: 1
},
{
“id”: “price”,
“field”: “price”,
“type”: “double”,
“input”: “number”,
“operator”: “equal”,
“value”: 10000
}
]
}
],
“valid”: true
}