Can JavaScript return an object and a string simultaneously?
const myModel = new Map();
if (preview === "pdf") {
myModel.set("IS_IGNORE_PAGINATION", false);
myModel.set("format", "pdf");
} else if (preview === "xls") {
myModel.set("IS_IGNORE_PAGINATION", true);
myModel.set("format", "xls");
myModel.set("checking", true);
}
return new ModelAndView("returnOnReleased", myModel);