1b.app
Link copied -

Writing a response from an array when passing a process to an API

Here https://univer.1b.app/admin/shop/workflowstatus/707/action/new/
There is an action "Pass process to API"
As a result of the action here https://univer.1b.app/54918/?tabid=10 we get JSON with arrays.
Question. How can these arrays be handled by the "Pass Process to API" action?
Is it possible to get the whole array in a field and how?
Is it possible to select an array value by "[2]" for example?
Original question is available on version: ru

Answers:

you need to select the response format as json and then you can run through the arrays like any other data type, if the array is with arrays (you will see brackets [] inside), then the first element of the array is passed as /0/ second as /1/ and so on.
For example, if in the json response:
{"name":"xxxx"} then xxxx can be reached simply through name
if: [{"name":"xxxx"},{"name":"yyy"}] then you need to get to xxxx through /0/name and to yyy through /1/name
10.07.2023, 17:38
Original comment available on version: ru


Care Department
OneBox production wrote:
you need to select the response format as json and then you can run through the arrays like any other data type, if the array is with arrays (you will see brackets [] inside), then the first element of the array is passed as /0/ second as /1/ and so on.
For example, if in the json response:
{"name":"xxxx"} then xxxx can be reached simply through name
if: [{"name":"xxxx"},{"name":"yyy"}] then you need to get to xxxx through /0/name and to yyy through /1/name

Thanks, there is.
13.07.2023, 13:53
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment