function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kwasi Asiedu 3Kwasi Asiedu 3 

Can't access object in HTTP post response?

Hello,

I have been able to make a request using the REST API to get access to assets in Contant Builder. I have followed this documentation on "Advanced Query" (https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/assetAdvancedQuery.htm) for "Assets". I am able to get a full response back when requesting a specific "template-based email". 

I am using the following requests to retrieve the template-based email:
 
var emailRequest = HTTP.Post(url, contentType, payload, headername, headervalue);
         var emailResult = Platform.Response.Write("Email request: " + emailRequest.Response);
         return emailResult;


I get a similer response to the following but directly related to the template based email:

Sample response  The issue is I am trying to narrow down the response and be able to pick out specific sections of the response. Is there a way to return the "items" portion of the response?

I have tried a number of variations adjusting the "emailRequest.Response" portion of my code but I only get "undefined" in the response.

Thanks.