public IActionResult Arrays([FromBody] ArrayModel array) { if (array.What == "sum") { return(Json(new { result = homeService.ArraySum(array) })); } else if (array.What == "multiply") { return(Json(new { result = homeService.ArrayMultiply(array) })); } else if (array.What == "double") { return(Json(new { result = homeService.ArrayDouble(array) })); } return(null); }