Plugin Development: Input of type object {"mykey" : int}

I’ve got a plugin that accepts an input object
image

I want to fill it with something like: {“ResultCount” : 55 }
… ideally the integer would be calculated based on the length of the output of a previous step…

{
“Results count”: {{$length ([“GetResults”].[my_data])}}
}
But the json parser tells me to get bent… (Invalid JSON syntax used for object input). Any ideas what else I need to comment out besides the quotes?

An apt description of our errors. :slight_smile:

{
“Results count”: {{$length ([“GetResults”].[my_data])}}
}

That looks right. Try putting that in a type converter step right before your plugin to convert from String to Object. I have a bad feeling our parser isn’t handling the input very well.

EDIT: Or it could be [my_data] isn’t being interpreted as a list, which causes a cascade into “this doesn’t look like an object” error.

1 Like

Type converter step is the way to go (but I’m just going to modify the plugin to do that for me); When I wrap the variable in quotes, it work fine (except now I have the string “69” instead of an integer) . I think the parser doesn’t like variables that return non-string objects.