Javascript examples for Array Operation:Array Element
Parse array into a new array
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*w w w .j a va 2s. c o m*/ var oldArray = [ {number: '1', alphabet: 'abcde'}, {number: '5', alphabet: 'abcde'}, {number: '6', alphabet: 'abcde'}, {number: '9', alphabet: 'abcde'}, ] var newNumberArray = oldArray.map(function(item){ return item.number; }); console.log(newNumberArray); } </script> </head> <body> </body> </html>