Using JSON.Stringify I pass the following string inside another Stringify object.
[
[
"I-000-4310-000",
"Convention Registration",
"59.99"
],
[
"I-000-4311-000",
"Convention Breakout",
"39.99"
]
]
In my C# web service I need to split the string apart into a string array that looks like this:
string[, ,] GLCodes = new string[,,]
{
{
{ "I-000-4310-000", "Convention Registration", "59.99" },
{ "I-000-4311-000", "Convention Breakout", "9.99" }
}
};
What is the simplest way to do this?
Using Json.NET you can deserialize that list with this
string[][] strings = JsonConvert.DeserializeObject<string[][]>(jsonData);
Hope this helps!