Skip to main content

I have a zap that processes json data into a python script. when I assign the input data you can see that there are null values in the string. This is good and expected, but when it gets to the code the null values are removed. I have tried replacing the “,,” values with “,null,” but because the “,,” values are stripped out before the code runs this does not work. I think this is an issue with the code functions in zapier.

 

 

Hi @Dan0nator 

Good question.

Try this workaround…

Use a Formatter > Utilities > Line Items to Text step first.

You can use that to combine arrays into 1.

e.g. gARRAY1]||||ARRAY2], which will handle the nulls.

Then you can pass that into the Code step and handle it better.


The input shows the blank leading fields
the output has removed it.

 


@Dan0nator

Try something like this…

 

Array with null values.

 

 

Formatter > Utilities > Line Items to Text

NOTE: Set a static value to join

 

Then you can handle the TEXT output how you want into the Code step.

 


@Troy Tessalone that did the trick. I added “value “ and in my python code im just doing text matching so that additional word did not impact the code so it is working fine now. Thanks for the help.