I have a JSON -
{“key”:“Ga”, “category”:“Conditional”, “ActivityName”:“Condition”},
{“key”:“Gb”, “category”:“Outcome”, “group”:“undefined”, “ActivityName”:“Outcome1”, “Name”:"", “XPath”:""},
{“key”:“Gc”, “category”:“Outcome”, “group”:“undefined”, “ActivityName”:“Outcome2”, “Name”:"", “XPath”:""},
{“category”:“Parallel”, “ActivityName”:“Parallel”, “key”:-8},
Want it like this -
{“category”:“Condition”, “ActivityName”:“SOMETHING”, “key”:“Ga”, “Outcomes”:[{ “Name”:“Duplicate”, “XPath”:"//hasDuplicates=True",“key”:”GB”},{“Name”:“NonDuplicate”, “XPath”:"//hasDuplicates=False",“key”:”GC”}]}
How can i achieve this?
i am using GraphLinksModel. Is it possible to use this model instead of treemodel and get the desired JSON format. Any Sample which i can refer which has nested JSON object?