Hi,
If I do a post from jquery like so:
$.post("Row/getRowNames", { currRow: "MyRow", offset: 3 },
function(rowNames) {
/* How do I interpret the data to
},
"json");
How do I interpret the data rowNames that's passed back from the method in the controller? I need to turn the json result into an array of strings some how...
Here's the Controller method that gets the row names:
[AcceptVerbs(HttpVerbs.Post)]
public JsonResult getRowNames(string currRow, int offset)
{
return this.Json(_rowRepository.getRowNamesByOffset(currRow, offset));
}
and getRowNamesByOffset(currRow, offset)
returns an array of strings.
I'm really not sure how Json works, what is it doing to the array before it passes it back to the javascript? How is the javascript supposed to manipualte the Json in order to get the data it needs?