convert Javascript array to JSON string - Javascript JSon

Javascript examples for JSon:JSon Convert

Description

convert Javascript array to JSON string

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(){//  w w w .  ja va  2s.  c o m
    var values = {
      urlList: {}
    };
    values.urlList.english = "http://www.java2s.com/1";
    values.urlList.kannada = "http://www.java2s.com/2";
    console.log(JSON.stringify(values));  
    }

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

Related Tutorials