public ActionResult InteresseClientes() { Categorias model = new Categorias(Session); InteresseClientCount[] icc = model.ListPreferences(); string json = "{\"cols\":[{\"label\":\"Centro de Custo\",\"type\":\"string\"},{\"label\":\"Quantidade\",\"type\":\"number\"}],\"rows\":["; bool first = true; foreach (InteresseClientCount item in icc) { if (! first) { json += ","; } first = false; json += "{\"c\":["; json += "{\"v\":\""+ item.Nome +"\",\"f\":null},"; json += "{\"v\":" + item.Quantidade + ",\"f\":null}"; json += "]}"; } json += "]}"; object objJson = json; return View("InteresseClientes", objJson); }