Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a custom code block with python code that returns a python list of app id's.
[item 1, item2, item3] python sees this as an list and will loop over this list in shell. In automations I've got a code block and after that a list-variable where the output is put in.
What I find is that even tho the variable is a list the output is treated as 1 item instead of 3 therefore my call to get app information about 3 app's throws an error because it places all 3 appid's into 1 string instead of preforming the action 3 times.
I want to loop over the list of app id's to get app information.
I figured it out. the list as an output in automations as mentioned above is [item 1, item2]
this is from a native print statement in python then it doesn't work.
if you add the code than it works
(don't forget to do import json)
print(json.dumps(list))
I figured it out. the list as an output in automations as mentioned above is [item 1, item2]
this is from a native print statement in python then it doesn't work.
if you add the code than it works
(don't forget to do import json)
print(json.dumps(list))