Get attributes from JSON object returned by ajax - Javascript JSon

Javascript examples for JSon:JSon String

Description

Get attributes from JSON object returned by ajax

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(){/*from   w  w w.ja v  a2s.com*/
var data = {
   name: "Henk",
  tv: "",
  lastName: "Jansen",
  adres: "Main 12",
  postcode: "1238765 AP"
};
console.log(data.name);
    }

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

Related Tutorials