How to return JSON structure in ASP MVC

ajax, asp.net-mvc, json

Solution

Try

return Json(new {answers = answers});

Problem

i need to return a JSON with this format: ``` {"answers": [{"id": "93", "value":"Ahstron"}, {"id"="94", "value"="Sampers"}]} ``` Im using the return Json() method form ASP MVC Framework, is there a way to specify that this JSOn is a collection of answers like in the sample code? or must i create my own? with the ``` return Json(answers); ``` i just get this: ``` [{"id": "93", "value":"Ahstron"}, {"id"="94", "value"="Sampers"}]} ```

Original source