var data = [
{lastName: "Dente", name: "Al"},
{lastName: "Noring", name: "Constance"},
{lastName: "Haas", name: "Jack"},
{lastName: "Tress", name: "Matt"},
{lastName: "Turner", name: "Paige"}
];
这是我要创建的 javascript 数组。如何从 servlet 发送此数据并在 javascript 中创建数组对象。
String dataString=/*prepare data */
response.getWriter().write(dataString);
如何在 servlet 中准备此 dataString 以及如何在客户端中从该字符串创建数组?