Create a Post Body from Multi Select Dropdown

Hey! I have used Multiselect drop down plugin in my app. So whenever i change my drop down value, I need to call an API configured in API connector plugin. I am able to set the query parameters but the post body requires a list of objects. The values I use to populate the drop down are of this format:

[
{
“id”: “xxxx-xxxx-xxxxxxxxx”,
“displayName”: “string”,
“type”: “string”
},
{
“id”: “xxxx-xxxx-xxxxxxxxx”,
“displayName”: “string”,
“type”: “string”
}
]

The option caption is displayName.

The post body format for another API is also of the same format (i.e)

[
{
“id”: “xxxx-xxxx-xxxxxxxxx”,
“displayName”: “string”,
“type”: “string”
},
{
“id”: “xxxx-xxxx-xxxxxxxxx”,
“displayName”: “string”,
“type”: “string”
}
]
image
It is showing error if I do this. Also I tried using JSON tools plugin to convert the objects to JSON but the result I got was:

“[{"_api_c2_id":"xxxx-xxxx","_api_c2_displayName":"string","_api_c2_type":"string"}]”

It is appending _api_c2 for all the properties.
I am using my api’s written using .net core and my DB. I need a way to send the list of objects to another API. Can someone help me!!

1 Like

très intéressant