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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to parse and extract JSON data

Hi all,

 

I have a fairly simple issue that I'm struggling to understand.  I have a straightforward job (shown below) and I'm trying to loop through the JSON output (also below) and eventually use a tMap and push to a DB.  I'm having an issue due to the fact that I don't understand the tExtractJSONFields component thoroughly, nor the difference between the read by options "JsonPath" vs "Xpath".  I've attached the job I have (without the tmap), the JSON structure and the desired output.  I was hoping to have some help on this as well as some clarification on whether or not my thinking is correct on the components I have selected?  Also we're on version 6.2.1.

 

 

{
"paging": {
"pageIndex": 1,
"pageSize": 1000,
"total": 113
},
"measures": [
{
"metric": "METRIC1",
"history": [
{
"date": "DATE1",
"value": "VALUE1"
},
{
"date": "DATE2",
"value": "VALUE2"
},
{
"date": "DATE3",
"value": "VALUE3"
}
]
},
{
"metric": "METRIC2",
"history": [
{
"date": "DATE4",
"value": "VALUE4"
},
{
"date": "DATE5",
"value": "VALUE5"
},
{
"date": "DATE6",
"value": "VALUE6"
}
]
}
]
}

 

Thanks in advance!

 

 

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Was able to figure this out actually very simply.  I should have played with Xpath before asking...

 

 


textractjson.PNG

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Was able to figure this out actually very simply.  I should have played with Xpath before asking...

 

 


textractjson.PNG