List of Items to JSON Array

I am trying to make an API call to one of our hosted products, and as a key element it needs to include a array of items from a database search.

FROM

  • A
  • B
  • C

TO

"items": [
    {
      "item_id": A,
      "item_type": "Product",
    },
    {
      "item_id": B,
      "item_type": "Product",
    },
    {
      "item_id": C,
      "item_type": "Product",
    }
  ]
}

How do I go about doing this? Have tried everything I can think of - HELP!

First …

Create strings for each one between the {…} On your record.

image

Then pass a list of those things into the API with join with ,

In the API connector you will need to replace the inside of the array (between the […]) with a parameter…

image

image

image

6 Likes