var data = [
{lastName: "Dente", name: "Al"},
{lastName: "Noring", name: "Constance"},
{lastName: "Haas", name: "Jack"},
{lastName: "Tress", name: "Matt"},
{lastName: "Turner", name: "Paige"}
];
this is the javascript array i want to create. How to send this data from a servlet and create the array object in javascript.
String dataString=/*prepare data */
response.getWriter().write(dataString);
How to prepare this dataString in servlet and how to create array from that string in the client ??