Forum Discussion

ddangler's avatar
ddangler
New Contributor III
8 years ago

How to change default array document structure?

I am working with Zendesk API and one of its endpoint expect document structure as below:

{
  "tickets": [
    { "id": 1, "status": "solved" },
    { "id": 2, "status": "pending" }
  ]
}

But snaplogic is sending data like this:

[
	{
	  "tickets": [
	    { "id": 1, "status": "solved" },
	    { "id": 2, "status": "pending" }
	  ]
	}
]

How can I remove those extra square brackets at the beginning and the end?

I played around with the HTTP Entity setting in the REST PUT snap but could not get it work. Any help here?

Here is the screenshot showing what I am trying to acheive: