Hereby sharing the piece of server side javascript code in which I am stuck. I have added if condition in line number 15. If the condition is true, it should come out of loop and to execute from line number 3 to 9 again and to enter the for loop at line number 13. Please suggest
Hereby sharing the piece of server side javascript code in which I am stuck. I have added if condition in line number 15. If the condition is true, it should come out of loop and to execute from line number 3 to 9 again and to enter the for loop at line number 13. Please suggest
var resp = req.send();
var myObj = Platform.Function.ParseJSON(String(resp.content))
var url3 = "https://graph.microsoft.com/v1.0/groups/" + myObj.value[0]['id'] + "/members";
var req1 = new Script.Util.HttpRequest(url3);
req1.emptyContentHandling = 0;
req1.retries = 2;
req1.continueOnError = true;
req1.contentType = "application/json"
req1.setHeader("Authorization", auth);
req1.method = "GET";
var resp1 = req1.send();
var myObj1 = Platform.Function.ParseJSON(String(resp1.content))
for (var i = 0; i < count(myObj1); i++)
{
if (myObj1.indexOf(group) >= 0) {
call url3
} else {
var resp = req.send();
var myObj = Platform.Function.ParseJSON(String(resp1.content))
var DE = DataExtension.Init("TEST_DL_Extract");
for (var key in myObj.value) {
var rows = Platform.Function.UpsertDE("TEST_DL_Extract",["Email_Address"],[myObj.value[key].mail],["First_Name","Last_Name"],[myObj.value[key].givenName,myObj.value[key].surname]);
}; }
};