views:

107

answers:

1

Hi!

Actually my question is simple. I think. But unfortunately, Google can't help me this time. I want to return a JSON in my view in this format:

[[0,"Mark Kordon",null,"My HTML - Mark Kordon"],[1,"John Doe",null,"John Doe Markup"]]

How is this possible?

Thanks!

+5  A: 

Sounds like all you want to do is return your model from the controller as a JsonResult:

public ActionResult Index()
{
    return Json(yourModel);
}
Nick Riggs
Didn't have time to test it, but wouldn't it also return the properties names?
Kordonme