Javascript examples for JSon:JSon Parse
Parse string to Json object
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//w w w. ja va2s .co m var x = document.getElementById('pids').innerText; var y = JSON.parse(x); console.log(y.length); } </script> </head> <body> <span id="pids" style="display:none">["26551826","22956811","22959266"]</span> </body> </html>