我对javaScript很新,并且在解析JSON时遇到了一些问题。我从我在我的网络服务器上运行的php脚本得到一个json响应,看起来像这样。
{"well_id":"1","case_num":"","description":"Tsipaisi","type":"Mark II, borehole with hand pump","longitude":"0.3073056","latitude":"5.8448333","condition":"Good","year":"2014","maintained_date":"2014-07-22","aprove":"t"}{"well_id":"2","case_num":"","description":"Gbanavey","type":"Mark II, borehole with hand pump.","longitude":"0.5042800","latitude":"5.8708300","condition":"Good","year":"2014","maintained_date":"2014-11-11","aprove":"t"}{"well_id":"3","case_num":"","description":"Kopehem","type":"Mark II, borehole with hand pump","longitude":"0.4998300","latitude":"5.8660500","condition":"Good","year":"2014","maintained_date":"2014-11-11","aprove":"t"}
我需要解析它并将标记的各个节点和随之而来的信息放入它们自己的变量中,以便我可以加载地图标记。我见过JSON.parse()和xmlHttp方法,并且能够使用xmlHttp获取responseText但无法获取从JSON解析的值。
请帮助我解决这个问题的最佳方法!
由于