答案 0 :(得分:1)
您看到的是浏览器试图向您显示数据的结构。实际的结构是一个对象数组,就像你在代码中写的一样:
[{firstname: "Fozzy", lastname: "The Foz", title: "Garbage Disposal..."}, {...}, {...}]
要将变量data
转换为JSON字符串,请调用:
JSON.stringify(data);
这将返回:
"[{"firstname": "Fozzy", "lastname": "The Foz", "title" : "Garbage Disposal..."}, {...}, {...}]"