Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More

How to construct JSON list in an automation

100% helpful (2/2)
cancel
Showing results for 
Search instead for 
Did you mean: 
PradeepUrala
Former Employee
Former Employee

How to construct JSON list in an automation

Last Update:

Sep 30, 2021 4:55:56 AM

Updated By:

PradeepUrala

Created date:

Feb 18, 2021 4:07:01 AM

Constructing a JSON list that is compatible with the destination application requires few steps in automation.

  1. Add a variable block and define a list:

    1. Go to Manage Variables
    2. Enter List name
    3. Change variable type to "List"
    4. Save.

      pradeepurala_0-1613637780404.png

  2. Empty this list by selecting the 'Empty' operation in the block.

    pradeepurala_1-1613637831978.png

  3. Loop through the Source list to iterate through each object of the list.

    pradeepurala_5-1613638432323.png

  4. At this point, we'll have to construct each object for our destination list with the appropriate Key-Value pair.
    You will need another variable block inside the loop with the type "Object".
  5. Select the "Set key/value" operation for this variable block and enter the destination Object's Keys. Map the values for this object by selecting the values from the source list.

    pradeepurala_6-1613638574752.png

  6. Add another variable block and select the previous list variable. Now, add the operation "Add Item to" and select the object variable previously constructed.

    pradeepurala_7-1613638701908.png

  7. We can use the output of this final list variable as a destination list.

 

 

The information in this article is provided as-is and to be used at own discretion. Depending on tool(s) used, customization(s), and/or other factors ongoing support on the solution below may not be provided by Qlik Support.

Tags (1)
Labels (2)
Version history
Last update:
‎2021-09-30 04:55 AM
Updated by: