External API JSON not returning array brackets

Hello, I’m not sure if I’m doing anything wrong, but I’m stuck getting my external API up and running. I’m using a Global API, and I’m successfully returning data to my API Tester (see below), but I’m unable to return any of the fields for some reason. For instance, I create a looper consumer, and enter {{dc:looper:field key="total"}}, but no data returns.

The only thing I can figure is that the JSON that is returned doesn’t include the array square brackets [] at the beginning and the end, and therefore is not readable by the loopers? Am I right or wrong on that?

Hey Bobby,

This is exactly where Data Key comes into play. It is the key to loop if you were sent back an object. In your case the Data Key would be by_interval so you loop that array data. The video released today also features a similar data structure to what you are working with. Have a great day!

Hey Charlie,

Don’t think you understood my problem. I actually wanted the ‘total’ data from the base layer of the JSON, but my dynamic content wasn’t returning it. I figured out why. Well, I never figured out why, but I did figure out how to get it to work.

So, I was trying to switch some of my API calls I had made with a custom looper provider to the new global API system, but I could not get my dynamic content to appear for the life of me until I created a completely new element and recreated everything from scratch. Even though my global API call was absolutely identical. Not sure if there’s some bug in the system there or not.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.