I have this string:
1=True&2=150+minutes&3=True&4=True&5=Continuing+to+smoke
How can I get it into an array or object like this:
[1] => True
[2] => "150 minutes"
etc?
I have tried this:
<HttpPost()>
Function GetQuizScore(ByVal data As String) As JsonResult
'Debug.Print(data)
Dim jss = New JavaScriptSerializer
Dim dict = jss.Deserialize(Of List(Of String))(data)
Debug.Print(String.Join(", ", dict))
Return Json(data)
End Function
But, it gives me an error that says:
Invalid JSON primitive: True&2=150+minutes&3=True&4=True&5=Continuing+to+smoke.
Thanks for your help.