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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

headers in twriteJSONField

Hi,

I'm trying to use the tWriteJSONField component.

It's doing what i want but i don't have the headers in my rows.

 

The process is pretty simple but i don't understand where i do something wrong

0683p000009M8Bp.jpg

 

0683p000009M8xS.jpgtWriteJSON

And here is the result

{"trucks":["VO","K 360 IB4X2NB",["01483","CARROSSERIE","HIGER",[]],["00448","CONFIGURATION ESSIEUX","4X2",[]],["01503","CARROSSERIE","HIGER",[]],["06526","ORDINATEUR DE BORD","AFFICHAGE KM/H",[]],["02471","NIVEAU EMISSION","EEV",[]],["02301","ORDINATEUR DE BORD","AFFICHAGE KM/H",[]],["00668","PNEUMATIQUES 2E ESSIEU AR","295/80 R22.5",[]],["00666","PNEUMATIQUES ESSIEU AV","295/80 R22.5",[]],["00111","RETARDER","SCANIA",[]],["00020","BLOCAGE DIFFERENTIEL","AVEC",[]]]}

 

 

why i don't have my headers in my json?

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

The problem came from the "array" i read too much solutions and fused them too much

 

0683p000009M8HE.jpg

View solution in original post

2 Replies
Anonymous
Not applicable
Author

The problem came from the "array" i read too much solutions and fused them too much

 

0683p000009M8HE.jpg

Anonymous
Not applicable
Author

Hello,

 

I resolved your problem, inspire you from my config :

0683p000009M8xX.png

i have seen you have null values wrote with 2 brackets "[]", avoid this by setting a class attribute to object to the fields that might be null, else services who will use your data will struggle 0683p000009MACn.png

 

Here is the json result given :

{
	"trucks": {
		"type": "VO",
		"model": "K 360 IB4X2NB",
		"caracteristiques": [
			{
				"carac1": "01483",
				"carac2": "ESSIEUX",
				"carac3": "BLISFER",
				"carac4": null
			},
			{
				"carac1": "01783",
				"carac2": "ODB",
				"carac3": "COMPTEUR KMH",
				"carac4": null
			},
			{
				"carac1": "01413",
				"carac2": "CHASSIS",
				"carac3": "FONTE",
				"carac4": null
			}
		]
	}
}

 

Regards,

Pierre