What I want to do is send 2 lists in a JsonResult method and receive them in Ajax. Because I have a table from many to many, I need to change the IDs by names. So I need you to return the name of things.
public JsonResult GetHerramientas(int ID)
{
List<tbl_ListaHerramienta> servicioH = db.tbl_ListaHerramienta.Where(x => x.Id_datos == ID).ToList();
List<tbl_Herramientas> herramienta = db.tbl_Herramientas.ToList();
var result = new { Result = servicioH, herramienta };
return Json(result);
}
How can I send it and how do I receive it in Ajax?