How to Flatten tRESTlient JSON structure with Static code

Six Stars

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

 

 

OrderIDFirstNameLastNameAddressCouponItemIDItemQtyItemDescItemUnitPrice
6675JohnDoe123 spring st Code7369407591Fine Product68.99
 6675John  Doe 123 spring st Code7369408581Good Product37.99
 6675 John Doe 123 spring stCode777771Discount -9.6

 

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

 

Regards,

Joseph

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.