To create a Tree Grid Structure from the JSON input using nestedSortable jquery plugin -
i have following json file:
[{ "parent 1": [{ "child 1.1.1": 1, "child 1.1.2": "w1t1", "child 1.1.3": 1.5, "child 1.1.4": [{ "child 1.1.4.1.1": 1, "child 1.1.4.1.2": "w1t1c1", "child 1.1.4.1.3": 0.75 }, { "child 1.1.4.2.1": 2, "child 1.1.4.2.2": "w1t1c2", "child 1.1.4.2.3": 0.5 }] }, { "child 1.2.1": 2, "child 1.2.2": "w1t2", "child 1.2.3": 3, "child 1.2.4": [{ "child 1.2.4.1.1": 1, "child 1.2.4.1.2": "w1t2c1", "child 1.2.4.1.3": 1 }, { "child 1.2.4.2.1": 2, "child 1.2.4.2.2": "w1t2c2", "child 1.2.4.2.3": 1.5 }] }] }, { "parent 2": [{ "child 2.1.1": 1, "child 2.1.2": "w2t1", "child 2.1.3": 1.5, "child 2.1.4": [{ "child 2.1.4.1.1": 1, "child 2.1.4.1.2": "w2t1c1", "child 2.1.4.1.3": 0.75 }, { "child 2.1.4.2.1": 2, "child 2.1.4.2.2": "w2t1c2", "child 2.1.4.2.3": 0.5 }] }, { "child 2.2.1": 2, "child 2.2.2": "w2t2", "child 2.2.3": 3, "child 2.2.4": [{ "child 2.2.4.1.1": 1, "child 2.2.4.1.2": "w2t2c1", "child 2.2.4.2.3": 1 }, { "child 2.2.4.2.1": 2, "child 2.2.4.2.2": "w2t2c2", "child 2.2.4.2.3": 1.5 }] }] }]
the above json valid json file (checked using jsonlint). also, see desired parent-child structure overwriting json code here
i want create tree grid view using nested sortable plugin. plugin available here. shows data in tree view, values hard-coded. want replace values values within json file. should identify parent , child nodes , render appropriately. how make dynamically rendered ?
does have workaround ?
Comments
Post a Comment