Get value from a JSON by parsing String to JSON - Javascript JSon

Javascript examples for JSon:JSon stringify

Description

Get value from a JSON by parsing String to JSON

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  . j  av a2  s .c  o m
var stringiFiedArray = "[{\"ID\":-1,\"UserID\":\"T\\\\\\\\dard\",\"DateInput\":\"08/28/2017\",\"yID\":6,\"SubName\":\"Farmer\",\"DateCreated\":\"08/28/2014\",\"Note\":\"test\"}]";
var javasArrar = JSON.parse(stringiFiedArray);
console.log(javasArrar[0]["CategoryID"]);
    }

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

Related Tutorials