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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Parse nested JSON to CSV

Hi,

 

I need to create the following csv starting from the json below

 

0683p000009MaaW.png

 

{
	"data": [{
			"id": 1,
			"data": {
				"Tid": 1,
				"derived.security.Coupon.notional": 10,
				"derived.security.Coupon.paymentAmount": {
					"rows": [{
							"paymentAmount": 1,
							"periodNum": 1
						}, {
							"paymentAmount": 2,
							"periodNum": 2
						}
					]
				},
				"derived.security.Coupon.paymentRate": {
					"rows": [{
							"paymentRate": 0.5,
							"periodNum": 1
						}, {
							"paymentRate": 0.25,
							"periodNum": 2
						}
					]
				},
				"derived.security.Coupon.schedule.scheduleType": "A",
				"derived.security.Coupon.schedule": {
					"rows": [{
							"accrualEndDate": "31/12/2021",
							"periodNum": 1
						}, {
							"accrualEndDate": "31/12/2022",
							"periodNum": 2
						}
					]
				},
				"security": {
					"rows": [{
							"name": "APPLE"
						}, {
							"name": "PINTEREST"
						}, {
							"name": "GOOGLE"
						}
					]
				}
			}
		}, {
			"id": 3,
			"data": {
				"Tid": 3,
				"derived.security.Coupon.notional": 40,
				"derived.security.Coupon.paymentRate": {
					"rows": [{
							"paymentRate": 2,
							"periodNum": 1
						}, {
							"paymentRate": 1.5,
							"periodNum": 2
						}
					]
				},
				"derived.security.Coupon.schedule.scheduleType": "C",
				"derived.security.Coupon.schedule": {
					"rows": [{
							"accrualEndDate": "31/03/2021",
							"periodNum": 1
						}, {
							"accrualEndDate": "31/03/2022",
							"periodNum": 2
						}
					]
				}
			}
		}, {
			"id": 4,
			"data": {
				"Tid": 4,
				"derived.security.Coupon.notional": 20,
				"derived.security.Coupon.paymentAmount": {
					"rows": [{
							"paymentAmount": 2,
							"periodNum": 1
						}, {
							"paymentAmount": 4,
							"periodNum": 2
						}
					]
				},
				"derived.security.Coupon.paymentRate": {
					"rows": [{
							"paymentRate": 2,
							"periodNum": 1
						}, {
							"paymentRate": 1.5,
							"periodNum": 2
						}
					]
				},
				"derived.security.Coupon.schedule.scheduleType": "D"
			}
		}
	]
}

Could you please help me?

 

Thanks,

Paolo

Labels (3)
3 Replies
manodwhb
Champion II
Champion II

@not specified not specified​ , if you are using Talend Enterprise software you can leverage Talend Data Mapper would be easy to convert this.

 

Thanks,

Manohar

Talend_ent
Contributor III
Contributor III

can't we do with other components/approaches rather than using Talend Data Mapper?

 

Thanks,

Talend_ent.

root
Creator II
Creator II

You can try tJSONDoc component available in the Talend Extensions... its source is available https://github.com/jlolling/talendcomp_tJSONDoc