Setting a Array to Json

Hi guys, i have a array coming from a Jotform data. Then i created a Set Variables to join those datas connecting them separated with comma. But i also need to encapsulate them with double quote.

Example: My_Array = A , B , C

After join.
NewArray = A,B,C

What i need
NewArray = “A”,“B”,“C”

I need this to send this information in a JSON.
“MyArray”: [NewArray]

Thx Guys.

Welcome to the Make community!

Try using the JSON “Transform to JSON” module:

Transforms any object to JSON.

For more information, see https://www.make.com/en/integrations/json, and https://www.make.com/en/help/app/json in the help centre.

Alternatively, you can use the built-in function join

e.g.:

​​["{{join(2.array; """,""")}}"]

Screenshot_2025-03-10_140353

For more information, see the Array functions page in the Make Help Centre, which covers the following:

  • add (array; value1; value2; …)
  • contains (array; value)
  • deduplicate (array)
  • distinct (array; [key])
  • first (array)
  • flatten (array)
  • join (array; separator)
  • keys (object)
  • last (array)
  • length (array)
  • map (complex array; key;[key for filtering];[possible values for filtering separated by a comma])
  • merge (array1; array2; …)
  • remove (array; value1; value2; …)
  • reverse (array)
  • shuffle (array)
  • slice (array; start; [end])
  • sort (array; [order]; [key])
  • toArray (collection)
  • toCollection (array; key; value)

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

4 Likes

Hi Sam.
Both of your solutions are GREAT !! They worked and i chose the first one to keep going.
Thank you so much for the fast help. :smiling_face_with_three_hearts:

2 Likes