Return an anonymous type; all you're missing is the word new in your code:
[HttpGet]
[Route("api/some-endpoint")]
public IHttpActionResult getAll()
{
...
...
return Ok(new { firstList, secondList });
}
To rename the properties:
[HttpGet]
[Route("api/some-endpoint")]
public IHttpActionResult getAll()
{
...
...
return Ok(new { propertyName1=firstList, propertyName2=secondList });
}
Why not a Tuple, as advocated in the other answer? If you use Tuple your property name are fixed to the name of the Tuple properties (you'll end up with JSON like { "Item1": [ ... ] ...
return Ok(new { firstList = firstList, secondList = secondList });which will return a new object with two properties namedfirstListandsecondList.