Just to rephrase your answer, when you return the IHttpActionResult, just assign the query result to a named property and return it like:
IHttpActionResult
return Ok(new { OnlineXs = xs});