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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
joefrancois
Contributor III
Contributor III

How to Flatten tRESTlient JSON structure with Static code

Hello,

 

I am trying to extract multiple row from a JSON tRESTClient input with some static data inject in the row creation. My JSON input look like so:

 

[
{
"OrderID": 6675,
"FirstName": "John",
"LastName": "Doe",

"Address": "123 spring st",

"OrderItemList": [
{
"ItemID": "736940759",
"ItemQty": 1,
"ItemDesc": "Widget One",
"ItemUnitPrice": 68.99,

},
{
"ItemID": "736940858",
"ItemQty": 1,
"ItemDesc": "Widget Two",

"ItemUnitPrice": 37.99,

}
],
"PromotionList": [
{
"PromotionName": "Code",
"Coupon": "Code",
"DiscountAmount": 9.6
}
]

 

I am trying to get the following out put

 

 

OrderID FirstName LastName Address Coupon ItemID ItemQty ItemDesc ItemUnitPrice
6675 John Doe 123 spring st  Code 736940759 1 Fine Product 68.99
 6675 John   Doe  123 spring st  Code 736940858 1 Good Product 37.99
 6675  John  Doe  123 spring st Code 77777 1 Discount  -9.6

 

I have been pulling my hair out, any help would be greatly appreciated.

 

Regards,

Joseph

Labels (4)
0 Replies