Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
You can change JSONPath to XPath and use parent operator
../id
some information about XPath vs JSONPath - http://goessner.net/articles/JsonPath/
You can change JSONPath to XPath and use parent operator
../id
some information about XPath vs JSONPath - http://goessner.net/articles/JsonPath/