Javascript examples for JSon:JSon String
Output array content with Json stringify()
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){// www.j a v a 2 s.co m var array1 = ["one","two","three"], array2 = ["1","2","3"], newarray = array1.map(function(c, i) { return [ c, array2[i] ] }); console.log(JSON.stringify(newarray)); } </script> </head> <body> </body> </html>