I have an a JQuery array , which I want to pass on to the Spring MVC controller and insert the selected values in the database.
Inside the $('#form').submit( function() { function I have created and array and used the push method to insert the values into the array , like this
`
var Arr = [];
loop ;
Arr.push(data)
`
Now I want to get this array in my Spring MVC controller and then iterate over the values to publish it to the database.
I have tried $.postJSON("run" + 'run',Arr); , but it does not work.
Request to please share an example.
Solved the issue.
I called an Ajax function and passed the array in data in the following format