how to pass nexted json otherwise

Answered
waffeu asked on July 5, 2019

Hello!!! My company and i are interested in flexmonster...But the issue here is that our data source is more of nexted json...The documentation doesn't really help me in that sence!!...Is it completely undoable? If not, can someone help me on how to archeive this? Exemple :

[
  {
    "id": 29,
    "ParentCode": "0F2G22",
    "ParentName": "A",
"NumberOfChildren": 5,
"NumberOfBoys": 3,
"NumberOfGirls": 2, "children": [ { "id": 0, "field0": "Goldman", "field1": 0, "field2": 0, "field3": 0 }, { "id": 1, "field0": "IBM", "field1": 0, "field2": 0, "field3": 0 }, { "id": 2, "field0": "JP Chase", "field1": 0, "field2": 0, "field3": 0 }, { "id": 4, "field0": "Merrill", "field1": 0, "field2": 0, "field3": 0 }, { "id": 5, "field0": "Nokia", "field1": 0, "field2": 0, "field3": 0 } ] } ]

2 answers

Public
Vera Didenko Vera Didenko Flexmonster July 5, 2019

Hello,
 
Thank you for your question.
 
Please note that nested JSON data is not one of the supported by Flexmonster formats
 
Our team kindly suggests restructuring the JSON data the following way:
 

[
{
"id": 29,
"ParentCode": "0F2G22",
"ParentName": "A",
"child_id": 0,
"child_field0": "Goldman",
"child_field1": 0,
"child_field2": 0,
"child_field3": 0
},
{
"id": 29,
"ParentCode": "0F2G22",
"ParentName": "A",
"child_id": 1,
"child_field0": "IBM",
"child_field1": 0,
"child_field2": 0,
"child_field3": 0
},
{
"id": 29,
"ParentCode": "0F2G22",
"ParentName": "A",
"child_id": 2,
"child_field0": "JP Chase",
"child_field1": 0,
"child_field2": 0,
"child_field3": 0
}
...
]

 
This format is supported and the output should be as desired.
 
 
Please let us know if this would work for you.
 
We are looking forward to hearing from you.
 
Best Regards,
Vera

Public
waffeu July 5, 2019

Thanks for the quick reply!!! i will try the approach

Please login or Register to Submit Answer