I wrote this code,
public JsonResult Index(string query) { return Json(new object[] { "id", "text"}, JsonRequestBehavior.AllowGet); } And result,
["id","text"] But I want to look like below,
[{"value": 1 , "text": "Amsterdam"}] How can I do this? Thanks