Q:

How to get JS Grid value by java

I am using js grid ( http://js-grid.com/docs/ ), I want to get all of js-grid contents when user click the submit button as following code:
<link type="text/css" rel="stylesheet" href="jsgrid.min.css" />
<link type="text/css" rel="stylesheet" href="jsgrid-theme.min.css" />

<script type="text/javascript" src="jquery-3.3.1.min.js"></script>    
<script type="text/javascript" src="jsgrid.min.js"></script>

<form name="form1"  method="post" action="MyJavaBackend">
<div id="jsGrid"></div>
<Input type="submit">
</form>
<script>
    var clients = [
        { "Name": "Otto Clay", "Age": 25, "Country": 1, "Address": "Ap #897-1459 Quam Avenue", "Married": false },

    ];

    var countries = [
        { Name: "", Id: 0 },
        { Name: "United States", Id: 1 },
        { Name: "Canada", Id: 2 },
        { Name: "United Kingdom", Id: 3 }
    ];

    $("#jsGrid").jsGrid({
        width: "100%",
        height: "400px",

        inserting: true,
        editing: true,
        sorting: true,
        paging: true,

        data: clients,

        fields: [
            { name: "Name", type: "text", width: 150, validate: "required" },
            { name: "Age", type: "number", width: 50 },
            { name: "Address", type: "text", width: 200 },
            { name: "Country", type: "select", items: countries, valueField: "Id", textField: "Name" },
            { name: "Married", type: "checkbox", title: "Is Married", sorting: false },
            { type: "control" }
        ]
    });
</script>

But my backend file:
public ActionForward create(ActionMapping mapping, ActionForm form,
            HttpServletRequest request,
            HttpServletResponse response)
    throws Exception {

        String[] datas = request.getParameterValues("data");// **get null**
        return mapping.findForward("create");
    }

I have checked the following article:
http://zetcode.com/articles/jsgridservlet/
But it only get the one row edited records. (  I want get all the table data )
How can I get all the data ( all user input ) from jsgrid after user click the submit button via request.getParameterValues or request.getParameter or ..... ???  

A:

In font end javascript:
function onSubmit(){    

    var items = $("#jsGrid").jsGrid("option", "data");//$("#jsGrid") must match <div id="jsGrid"></div>
    var json = JSON.stringify(items);
    document.form1.json.value=json;
}

<form name="form1"  method="post" action="MyJavaBackend">
<div id="jsGrid"></div>
<input type="hidden" name="json"  >
<Input type="button" onClick="onSubmit();">
</form>

In Backend Java:
import org.json. JSONArray;
import org.json. JSONException;
import org.json. JSONObject;

.....
String json_data = request.getParameter("json");
JSONArray jsonArray = new JSONArray(json_data);
for(int i=0;i<jsonArray.length();i++) {
                    JSONObject jsonObject=jsonArray.getJSONObject(i);

                    String name=jsonObject.getString("Name");
                    String age=jsonObject.getString("Age");
                }
....

