[Solved] Need Help Decoding a JSON Response

@Charles_Casteel, The key here is understanding a little bit about the way that JSON text represents lists and objects. When you see something that begins with a '{' ( for example '{ _embedded: { events: ... ' ) that means that that the JSON text represents an object. When you see something that begins with a '[' ( for example '... [ { name: "Adam Sandler", ...' ) then that represents a list. It get a little more complicated, of course, because objects can contain lists within them and lists can contain objects within them.

In your case, we can see that the JSON returned by the Ticketmaster API call here represents an object with a property named "_embedded". The value of that "_embedded" property is an object which in turn contains a property called "events". The value of that "events" property is a list of objects representing a single event, and each of those objects has properties named "name", "type", "id", ... and interestingly "_embedded".

The value of that inner "embedded" property (which is contained in each object in the "events" list) is an object which has a "venues" property, whose value is a list. Each venue object in that list has a "name", "city" and "state" property (among others). The "city" property has as its value an object with a "name" property and the "state" property has as its value an object with a "name" property and a "stateCode" property.

Knowing all the above, here is a link to a shared example project that will display the name and city of the 2nd event. And here is a screenshot of the blocks from that project

Note that I have set the Ticketmaster URL property in the Web API property in the designer. That URL contains an API key and I’m not sure how long that key will be valid. If the app doesn’t work for you, you may need to replace the portion of that URL that contains the API key.

I hope this helps!

-Mark

3 Likes