Convert json into tree structure using javascript, client side -
i want convert following json code have collected using requests tree structure
"rules": [{ "name": "rule1", "isfirst": true, "conditions": [{ "outcometrue": { "gotorule": "rule2" }, "outcomefalse": { "changestatus": { "gotorule": "26" } }, "outcomeerror": { "changestatus": { "gotorule": "27" } }, }], },{ "name": "rule2", "isfirst": false, "conditions": [{ "name": "history check idnumber", "outcometrue": { "gotorule": "27" }, "outcomefalse": { "gotorule": "rule3" }, "outcomeerror": { "gotorule": "26" }, }], }]
into this. normal graph this:
have @ d3.js' tree
edit: example: d3.js tree diagram generated 'flat' data (uses array of objects)
Comments
Post a Comment