I am trying to input a list of dictionaries to my python component. however I don’t know how to make it understand that the type is a list,so it can iterate through it.any thoughts?
@nazanin_tabatabaei, i’ve tried below and it seems to work:
for the python component, right click on population and set it to “item access”, the type hint is set to “str”. So inside the component, the variable
population is of type
str. Then convert the string to code using
eval and access the first dictionary in the list:
p = eval(population) print p
or the first item in the first dictionary:
maybe @piac nows a more elegant way ?
thank you, I did it the hardway,by spliting the string!