I have the following code:
usersArray.forEach(user => {
users.push(data.Users.filter(userAws => userAws.Username === user.username))
});
this returns Arrays in Arrays.
But I want to add the inner Object direktly to the outher Array.
How can I flatten the inner Array?
thanks
UPDATE
usersArray.forEach(user => {
users.push([].concat.apply([], data.Users.filter(userAws => userAws.Username === user.username)))
});