Passing parameters to a procedure

I have read all the topics in the wiki and community, but I am still struggling with this. It seems many do.

I want to send some json data ot a table named ‘test’, e.g:

{“resource”: [{“column_one”: “val1”, “column_two”: “val2”}]}

Then I want to extract just the value for ‘column_two’ to use in a post process event v8js script, as the parameter for a procedure on another table.

How do I extract single values from the json payload of the incoming POST?

@Mark0 - I haven’t tried this for about a year and don’t have any examples in production, but in the new docs there is some info that might be relevant.

https://wiki.dreamfactory.com/DreamFactory/Features/Scripting#Resources_Available_To_A_Script

To summarize, it looks like the top level variables available to scripts are event and platform. In your case I believe you want event.request.payload.resource[0].column_two.

1 Like

Thanks so much! I had read the docs, but your line:

was what I needed!:smile:

1 Like