Question

Extracting data from parsed JSON

  • 13 June 2023
  • 1 reply
  • 43 views

Userlevel 2

I have a web-hook pushing parsed data. I have a section of javascript_variables I need to map based on the name of the variable, and the value present. 
 

My problem is, when I try to access this data in other steps, it's not allowing me. Zapier is lumping all the names together and all the values together. 

Tried creating a line itemizer action, but it does the same thing with the data in the other steps. I have these UTM Fields in CRM and ultimately just need map the data to the specific field.


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +14

Hi @Joseph.winters 

Good question.

Try this Code step JavaScript.

Map the dynamic variables from the previous step to the Input Data fields.

let variableName = inputData.variableName.split(",");
let variableValue = inputData.variableValue.split(",");;

let Set = {};

for (let i = 0; i < variableName.length; i++) {
Set[variableName[i]] = variableValue[i];
}

output = [{Set}];