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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
root
Creator II
Creator II

Validate JSON Object

I have the following JSON object coming from a web-service. I need to perform some validations on the object before consuming it.

 

  • I need to ensure that it contains
    • RESULT_1
    • RESULT_2
    • RESULT_15
  • Set an exception/ warning if the data array is empty (like RESULT_15)

What is the best way to achieve this? I could not find any validation information I can plug into tExtractJsonFields component.

 

Any help is appreciated. Thank you.

 

{
	"RESULT_1": {
		"columns": ["col1", "col2", "col3", "col4"],
		"data": [
			["0", null, "12345", "other"],
			["1", "a", "54321", "MA"],
			["0", null, "76543", "RI"]
		]
	},
	"RESULT_2": {
		"columns": ["c1", "c2", "c3", "c4"],
		"data": [
			["", "", "1877", "9"],
			["NULL", "Yellow", "1983", "2"],
			["NULL", "Red", "1981", "0"]
		]
	},
	"RESULT_15": {
		"columns": ["c1", "c2", "c3", "c4"],
		"data": [
			
		]
	}
}
Labels (1)
0 Replies