Guest User

Untitled

a guest
Dec 2nd, 2018
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. //get email id
  2. let users = [{
  3. userID: "1",
  4. userEmail: "user1@email.com"
  5. },
  6. {
  7. userID: "2",
  8. userEmail: "user2@email.com"
  9. },
  10. {
  11. userID: "3",
  12. userEmail: "user3@email.com"
  13. }
  14. ]
  15. let getEmailID = users.reduce(function (previous, current) {
  16. previous.push(current.userEmail);
  17. return previous;
  18. }, []);
  19.  
  20. console.log(getEmailID)
Add Comment
Please, Sign In to add comment