https://i.sstatic.net/2QjkJ.png
Within the params.value
object, there are 3 arrays containing names that I need to extract and store in a variable. I attempted to use a ForEach
loop for this purpose, but encountered an issue. Can you spot what's wrong?
var roles = params.forEach(x => params.value.Name);
return roles;
{"Object":[{"TerritoryId":1,"TerritoryName":"Russia","FirmPieRotationRuleId":1,"FirmPieWorkedYears":0,"FirmPieCoolOff":5,"FirmPieRoles":[{"TeamRoleId":1,"Name":"Engagement Leader","MinCount":1,"MaxCount":1,"SortOrder":0},{"TeamRoleId":2,"Name":"Signing Partner","MinCount":1,"MaxCount":1,"SortOrder":0},{"TeamRoleId":3,"Name":"Engagement Manager","MinCount":1,"MaxCount":1,"SortOrder":0}],"StatutoryPieRotationRuleId":null,"StatutoryPieWorkedYears":null,"StatutoryPieCoolOff":null,"StatutoryPieRoles":[],"NonPieRotationRuleId":null,"NonPieWorkedYears":null,"NonPieCoolOff":null,"NonPieRoles":[]}],"Code":0,"ErrorMessage":null,"Errors":[]}