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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to store JSON nested Array In DB

Hi All,

 

I have a requirement that gets the response from web API and inserts that response in DB. And getting response in JSON with nested array.

this is my JSON response:

{
"order": {
"id": 445157867567,

"tax_lines": [{
"price": "4.00",
"rate": 0.04,
"title": "NY STATE TAX"
}, {
"price": "4.50",
"rate": 0.045,
"title": "NY CITY TAX"
}, {
"price": "0.38",
"rate": 0.00375,
"title": "NY SPECIAL TAX"
}],

}
}

 

Need to insert that data into like this:

order_id,price,rate,title

445157867567, 4.000000 ,0.040000 ,NY STATE TAX

445157867567, 4.500000 0.045000 NY CITY TAX

445157867567, 0.380000 0.003750 NY SPECIAL TAX

 

My Job process snap attached, Can someone tell me where I'm doing wrong.

 

0683p000009Lz81.png

Labels (3)
1 Solution

Accepted Solutions
vapukov
Master II
Master II

You can change JSONPath to XPath and use parent operator

 

../id 

 

some information about XPath vs JSONPath - http://goessner.net/articles/JsonPath/

View solution in original post

2 Replies
vapukov
Master II
Master II

You can change JSONPath to XPath and use parent operator

 

../id 

 

some information about XPath vs JSONPath - http://goessner.net/articles/JsonPath/

Anonymous
Not applicable
Author

Thanks @vapukov 0683p000009MACn.png