Print given array using Json stringify - Javascript JSon

Javascript examples for JSon:JSon String

Description

Print given array using Json stringify

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){//ww w .  ja v a 2  s .  c  om
var arr1 = [{'i_id':'101'}];
var arr2 = [{'i_id':'102'}];
var array = arr1.concat(arr2);
console.log(JSON.stringify(array));
    }

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials