0

I'm trying to navigate through not being able to read multidimensional arrays with JavaScriptSerializer.

I think there's a workaround if I can do what's in this answer https://stackoverflow.com/a/9547490/1382306

Basically, if I can store json arrays in each field[] and loop through field, it should be no problem.

How do I loop through field if it's in the query string of this format

?field[]=["a","b","c"]&field[]=["d","e","f"]
Community
  • 1
  • 1

1 Answers1

0

Try

Request.QueryString ["field[]"][0]

... to return:

["a","b","c"]        {in quotes}

and

Request.QueryString ["field[]"][1]

... to return:

["d","e","f"]

You will have to strip off the square brackets and then use split () over the commas.

Mark Bertenshaw
  • 5,594
  • 2
  • 27
  • 40
  • `HttpContext.Request.QueryString("field[]")` grabs both of them as a character array –  May 10 '13 at 01:08