Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

109
Views
Problems with Parse json to retrieve the web page response

I have this web page response :

{"Status":"OK","RequestID":"xxxxxxxxxx","Results":[{"SubscriberKey":"teste132133","Client":null,"ListID":0,"CreatedDate":"0001-01-01T00:00:00.000","Status":"Active","PartnerKey":null,"PartnerProperties":null,"ModifiedDate":null,"ID":0,"ObjectID":null,"CustomerKey":null,"Owner":null,"CorrelationID":null,"ObjectState":null,"IsPlatformObject":false}],"HasMoreRows":false}

And I would like to just retrieve the SubscriberKey, like : "SubscriberKey":"teste132133"

So, I'm trying to use the Parse Json, but I believe that I'm doing something wrong that I don't know follow the code :

<script language="javascript" runat="server">

Platform.Load("Core","1");
  
var response = HTP.Get("https://xxxxxxxx.pub.sfmc-content.com/vjpsefyn1jp"); //web page link
var obj = Platform.Function.ParseJSON(response);
Write(obj.Results[0].SubscriberKey)

</script>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I only know client side JavaScript, maybe this will work for you, it uses fetch to get the reponse, and then extracts the json value. It uses an asynchronous function call so we can use await to make the code more readible.

<script type="module">
async function getKey() {
   const response = await fetch("https://xxxxxxxx.pub.sfmc-content.com/vjpsefyn1jp")
   const json = await response.json()
   const Results = json.Results
   const key = Results[0].SubscriberKey
   return key;
}
const key = await getKey();
console.log(`The key is: ${key}`);
</script>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!