Adding quatation marks to my Array output

Hello

I have an Array which i need to send with API Call to Jira to update the custom field, It´s a multiple choice selection pick customfield, and the values needs to be in quatation marks but i can´t figure out how and which tool i need to use to add to quatation marks to ma array output

Any idea how i can accomplish that?

I have this: WAPI, FAPI, BI

I need this: “WAPI”, “FAPI”, “BI”

Thank you for your replies!

Hi @Frantisek_Vujtek

To text with coma separate, please use iterator first to iterate “variable value” followed by text aggregator
For comma-separated text, begin by using an iterator to iterate the values from “variable value” array and then utilize a text aggregator with separated by coma.

MSquare Support
Visit us here
Youtube Channel

3 Likes

In truth, I am not in love with what I am about to propose, but it actually works quite well. The simplest thing to without adding iterators and aggregator modules, etc. is the following:

Update your Make an API call module with something like the following:

{
  "fields": {
    "customfield_11232": [
      "{{join(1.hodnoty; """,""")}}"
    ]
  }
}

Here’s an image as well.

This transformation is basically adding in the beginning and ending quotation mark and then performing a join to flatten the array to a string separated by ","

The reason you have to do this is became the Make an API call body is expecting the body as one big text string that it then, changes to JSON. In your case, you have a proper array that it getting implicitly converted to a string without the quotation marks. So, we have to do some manipulation to get it into a string the way want it.

Hopefully that is helpful.

yes, that works. Thank you so much! Join function helped to solve my issue.