Webhook How to capture full JSON Array | Community
Skip to main content
May 11, 2015
Question

Webhook How to capture full JSON Array

  • May 11, 2015
  • 1 reply
  • 1067 views
Looking for a way to capture the full array of a JSON Parameter.  For example I'd like to capture all the values and have them saved comma delimited in a Marketo field.   I'd like to capture all values returned in the "places" array.
 
{
   "post code": "90210",
   "country": "United States",
   "country abbreviation": "US",
   "places": [
       {
           "place name": "Beverly Hills",
           "longitude": "-118.4065",
           "state": "California",
           "state abbreviation": "CA",
           "latitude": "34.0901"
       }
   ]
}
So output would look something like this:  place name: Beverly Hills, longitude:-118.4065, state:California, state_abbreviation:CA, latitude:34.0901

You can accomplish this in javascript with a function like JSON.stringify, but not sure how to accomplish it in a webhook. 

Ultimately it would be best if all information was returned without specifiying any parameter to allow for a one to many relationship.

The response attributes places and places[0] do not work in the webhook mapping.

Thanks.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Edward_Unthank_
Level 7
July 10, 2015

Same question! Did you find an answer? The only thing I've been able to find so far is to edit the actual webhook endpoint and make it comma-separated, then using Marketo for the "contains" logic.

Edward