I ve a JS array, comprising multiple JS objects. I want to convert JS array to JSON type, & pass that to controller (using AJAX - POST call). So that I can retrieve the values from the Array of Objects, in my controller & save them in DB.
NB: I ve tried using $.stringify(myArry)
, but its not able to send data to controller in JSON format. Also I cant use $.toJSON(myArray)
, as I m not allowed to include a new plugin in our solution. :(
Plz suggest me any other idea.
Else if anyone can let me know how to deserelize the array in cotroller, that I ve sent by using $.stringify(myArry), that would also great. Something like
var result = JavaScriptConvert.DeserializeObject(inputContent, JsonDataType);