I have the following code:
Dim result = New Dictionary(Of String, String)
For Each item In food
result.Add(StrConv(item.Shrt_Desc.Replace(",", ", "), VbStrConv.ProperCase), item.Shrt_Desc)
Next
Return Json(result, JsonRequestBehavior.AllowGet)
I need to make it into the following key and value in JSON:
An array of objects with label and value properties: [ { label: "Choice1", value: "value1" }, ... ]
How can I do this? Thank you.