1

Using the below property I'm able to get Subscriber Properties.

var results = Subscriber.Retrieve({Property:"SubscriberKey",SimpleOperator:"equals",Value:Sk});

The results output is an array. How do I get particular value from it? Example: the results output is something like below

"results":[,
"EmailAddress":"xxxx@facebook.com",
"SubscriberKey":"xxx@facebook.com",
"ID":80503436,
"EmailTypePreference":"HTML",
"Status":"Unsubscribed"

How to get Status from this output.

I tried this and many others but doesn't work.

var currentStatus = results[].status; 
  • 1
    Have you tried it with the number in the brackets? eg results[0].Status? I also want to note that this is case sensitive, so status won't work, but Status should. – Gortonington Sep 17 '18 at 12:46
  • Can you share with us more accurate output of console.log(results);, please? – Michal Vavra Sep 17 '18 at 13:00
  • 1
    @Gortonington that worked! I did try results[0] too earlier, but lost me on the case-sensitive. Thanks – sfdcFanBoy Sep 17 '18 at 13:53
2

Turns out the case-sensitiveness put a block on my attempts.

results[0].Status (with the S capitalized on Status) gave the expected result. Thanks for the comments that pointed out the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.