Javascript examples for Array:map
Filter an object array based on the property
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w.j a v a 2 s .co m*/ var someObjArray = [{lastname:"foo", firstname:"bar", grade:10, userId:"foobar1234"}] console.log(someObjArray.map(s => s.userId)); } </script> </head> <body> </body> </html>