Get key value from JSON.parse() - Javascript JSon

Javascript examples for JSon:JSon Parse

Description

Get key value from JSON.parse()

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(){/*www . j a v a  2 s . c  om*/
var jsonData = JSON.parse('{"data": [{"id_user": "351023","name": "","age": "29","link": "http://domain.com"}]}');
document.getElementById('test').textContent = jsonData.data[0].id_user;
    }

      </script> 
   </head> 
   <body> 
      <div id="test"></div>  
   </body>
</html>

Related Tutorials