How to set an array element in Camunda Payload

I have the below payload for a Camunda step,

print(“CHART DIMENSION LIST::”,execution.getVariable(‘dimensionList’))
var payload = {
“query” : execution.getVariable(‘query’),
“dimensionList”: execution.getVariable(‘dimensionList’)
print(“PAYLOAD IS ::”,JSON.stringify(payload))

When I receive the output it shows the 1st print correctly but in the payload the dimensionList object is not getting passed. How to set it since its an array element?


CHART DIMENSION LIST::[employee_serial_number is Text Type, employee_name is Text Type]
PAYLOAD IS ::{“query”:“Show me all data”}

Hello @sourav24

Welcome to the community!

What does the process variable “dimensionList” look like when you inspect it from the Camunda cockpit?