Skip to main content
Question

How can I use input.config to get object not just an item from the object


Forum|alt.badge.img+8

I have an object that I output from another script using the Output.Set(key: value) method. The value that I’m passing is an array of json objects. It seems that there are a lot of objects to transform the object but I would prefer to just pass the object to my script to iterate over the object and use dot notation to get the values that I would like. 

 

I don’t see anything that just lets me keep the object as is and pass it through input.config only transforms or operations like length? Is there no way to pass an array or object??

 

 

 

 

2 replies

Alexey_Gusev
Forum|alt.badge.img+23

Hi,
Use JSON.stringify(object) to turn it into string, pass the string
Then, in new script, turn it back to object by await JSON.parse(input_variable)
I passed the table object, for example
 


 


Forum|alt.badge.img+8
  • Author
  • Known Participant
  • 32 replies
  • April 16, 2025

Thanks! I don’t know why I didn’t think about that. I wrote the stringified JSON to a field in a base and then pulled it back from the base with gellCellValue. This is much more elegant. To my credit it was 10:30pm last night, I think my brain had shut down at that point:)


Reply