Category: How do I do X?
Updated

This solution is summarized from an archived support forum post. This information may have changed. If you notice an error, please let us know in Discord.

Getting Data From an External JSON Response

Issue

I am using an API that returns a response with a "renderId" variable. However, I am having trouble setting the document viewer to display the link using this variable. I tried using "{{myapi.data.renderId}}" and "{{myapi.data[0].renderId}}" but both are undefined. I received a solution to the problem which was to use "{{myapi.data.data.renderId}}" and it now works.

Resolution

The person was trying to display a document viewer using an API response with a renderId variable. They tried both {{myapi.data.renderId}} and {{myapi.data[0].renderId}} but got undefined values. Another person suggested trying {{myapi.data.data.renderId}} which apparently worked for the original poster. This solution is essentially accessing the renderId value inside the data object in the API response. It's possible that the person's previous attempts were trying to access the value in a different way or structure within the response.