I would replace 172 + 173 with:
arrayUtil.forEach(response.UserEditResponse.Groups.Group, function (item, idx)

As that is what we normally do.