Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
root
Creator II
Creator II

Multi Level Json

I have a JSON object with following structure (sample). As far as I can see, there are three levels...

  • Parent
    • Child
      • Grand-Child

What will be the best way to consume this and maintain a parent-child-grand-child relationship in a table? I am not able to see good documentation on tExtractJSONFields/ tFileInputJson.

 

Any pointers appreciated.

 

{
    "categories": [{
        "id": "P1",
        "name": "P1",
        "path": "P1",
        "children": [{
            "id": "P1_C1",
            "name": "P1_C1",
            "path": "P1_C1",
            "children": [{
                "id": "P1_C1_xC1",
                "name": "P1_C1_xC1",
                "path": "P1_C1_xC1"
            }, {
                "id": "P1_C1_xC2",
                "name": "P1_C1_xC2",
                "path": "P1_C1_xC2"
            }]
        }]
	}]
}	
Labels (3)
1 Reply
Anonymous
Not applicable

Hi
Using 'Xpath' model and set the xpath loop expression to:
/categories/children/children
You should be able to read parent-child-grand-child data.

Regards
Shong