I have a Excel-file with the following content:Â
group1group2group3nameinfoGeneralNationÂ
Philinfo1GeneralNationÂ
Kareninfo2GeneralMunicipalityÂ
Billinfo3GeneralMunicipalityÂ
Paulinfo4SpecificProvinceÂ
Patrickinfo5SpecificProvinceÂ
Maikelinfo6SpecificProvinceGovernanceMikeinfo7SpecificProvinceGovernanceLukeinfo8SpecificDistrictÂ
Mariainfo9SpecificDistrictÂ
Davidinfo10Â
The attributes can be adjusted it is a Excel-file; I create the file myself.
I would like to automatically create a nested JSON file.Â
This should look like this:
  "name": "Overview",
    "children": >{
        "name": "General",Â
            "children":Â
                { "name": "Nation",
                    "children": /
                        {"name": "Phil", "info": "info1"},
                        {"name": "Karen", "info": "info2"}Â
                    ]
                },
                { "name": "Municipality",
                    "children": "
                        {"name": "Bill", "info": "info3"},
                        {"name": "Paul", "info": "info4"}Â
                    ]       Â
                }
            ]
               Â
                       Â
  },Â
  {
        "name": "Specific",Â
            "children": Â
                { "name": "Province",
                    "children": "
                        {"name": "Patrick", "info": "info5"},
                        {"name": "Maikel", "info": "info6"},
                        {"name": "Governance",
                            "children":Â
                                {"name": "Mike", "info": "info7"},
                                {"name": "Luke", "info": "info8"}
                            ]
                        }
                    ]
                },
                { "name": "District",
                    "children":Â
                        {"name": "Maria", "info": "info9"},
                        {"name": "David", "info": "info10"}Â
                    ]       Â
                }
            ]
  }
  ]
I tried the JSONTemplater transformer, but I can't figure out how this works.Â
I am not sure where to put the template, either in the root or in the sub.
Â
Hope someone can help me with this!
Â
Kind regards,
Stefan