I'm an angular newbie and I'm trying to loop through each object in an array to create a user row for each in a new array, see scenario below
In example below I only want to get to_user_id to create new row for each
[{id: 1, to_user_id: 5, from_user_id: 4},
{id: 2, to_user_id: 6, from_user_id: 4}]
Below is my service I know i have to wrap it in a for loop and push objects to a new array, I just don't know how to express it in angular
UserService.GetUserById(to_user_id)
.success(function (data) {
}).
error(function(error, status) {
alert(status);
console.log(error);
});
});