Brian
Brian

Reputation: 1808

Send 2 Dimensional Array to Web API Servcie

I have a table of strings in my web app. It's a 2 dimensional array in Javascript. I would like to send them to a C# Web API call so I can put them into a file and mail out to someone as CSV.

How do I post a 2 dimensional JSON object to a Web API method? What do I have to put in my jquery AJAX call and what should my method signature be in the Web API controller?

Upvotes: 1

Views: 1529

Answers (1)

Ivan Seidel
Ivan Seidel

Reputation: 2362

Possible solution is to send data as it is (a Json array) and parse it in C#, as explained here: How can I parse JSON with C#?

Upvotes: 1

Related Questions