Hi I would like to convert a list of User's properties into strings array (for json receiver) like:
List<User> users = <..list of users from db...>
var jsonData = (
from user in users
select new { user.Id, user.Person.Lastname, user.Person.Firstname });
return Json(jsonData)
The result is an array named fields
[{"Id":1,"Lastname":"Doe","Firstname":"John"},{"Id":2,"Lastname":"Smith","Firstname":"Adam"},...]
but I would like it to be the array of arrays of plain strings like:
[["1","Doe","John"]
["2","Smith","Adam"], ...]
How to cast linq result to strings array?