I have made a Retrieve call using the below code, but am struggling to print the Email field values into a clean list.
I can get this output and can see the email addresses are pulling through:
{"Name":null,"Keys":null,"Type":"DataExtensionObject","Properties":[{"Name":"Email","Value":"1449domain@yahoo.com"}],"Client":null,"PartnerKey":null,"PartnerProperties":null,"CreatedDate":"0001-01-01T00:00:00.000","CreatedDateSpecified":false,"ModifiedDate":null,"ModifiedDateSpecified":false,"ID":0,"IDSpecified":false,"ObjectID":null,"CustomerKey":null,"Owner":null,"CorrelationID":null,"ObjectState":null,"IsPlatformObject":false,"IsPlatformObjectSpecified":false}1: {"Name":null,"Keys":null,"Type":"DataExtensionObject","Properties":
The code I'm using is:
<script runat="server">
Platform.Load("Core","1.1.1");
<br><br>
var rr = Platform.Function.CreateObject("RetrieveRequest");<br><br>
Platform.Function.SetObjectProperty(rr, "ObjectType", "DataExtensionObject[1_Master_Data]");<br>
Platform.Function.AddObjectArrayItem(rr, "Properties", "Email");<br>
<br>
do { var results = [0,0];
var rows = Platform.Function.InvokeRetrieve(rr, results); <br>
var runstatus = results[0];<br>
var requestId = results[1];<br>
<br><br>
if (rows != null) {<br>
for (var i in rows) {<br>
var output = rows[i];<br>
Write(i + ": " + output + " <br/>");<br>
Write(Stringify(rows[i]));<br>
} <br>
} <br>
rr.ContinueRequest = requestId;<br>
} while (runstatus == "MoreDataAvailable")<br><br>
</script>
thank you