简单教程
提交运行
代码编辑器:
<script> var text = '{"employees":[' + '{"name":"简单教程","site":"https://www.twle.cn" },' + '{"name":"Google","site":"http://www.Google.com" },' + '{"name":"Taobao","site":"http://www.taobao.com" }]}'; var obj = JSON.parse(text); document.write(obj.employees[1].name + " " + obj.employees[1].site); </script>
运行结果: