Tôi đã sau mã jQuery/JStại sao parseJSON trả về null
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script>
$.getJSON("http://example/topics", {}, function(data){
console.log(data); // display the JSON *data* in the web console
console.log($.parseJSON(data));
});
</script>
console.log (dữ liệu) cho thấy dữ liệu JSON trong bảng điều khiển firebug (firefox add-on), nhưng console.log ($. parseJSON (dữ liệu)) hiển thị null.
lý do có thể là gì.
Tôi cần phải chuyển đổi chuỗi JSON thành mảng.