JSFiddle - React, Tailwind, and code Playground

HTML

<form>

x :<input type="text" name="r.1.0" value="x">
y :<input type="text" name="r.1.1" value="y">

</form>

JavaScript

var myObj = {};

function addValueToObj(objet, nom) {

			var pathBrackets = "";
			var regex = /\[([0-9]+)\]$/;
			nom = nom.split("=");
			var path = nom[0].split('.');
 			
			val = nom.slice(1).join("=");

for (var i = 0, tmp = objet; i<path.length-1; i++) {
				pathBrackets += path[i]+".";	
				if (path[i].match(regex)!=null) {

					var valindex = path[i].match(regex)[1];
					var index = path[i].match(regex).index;
					var newPath = path[i].substring(index, 1-path[i].length);

					if (typeof tmp[newPath] == "undefined") {
						tmp = tmp[newPath] = [];
						tmp = tmp[valindex] = {};
					} else {
						if (typeof tmp[newPath][valindex] == "undefined") {
							tmp = tmp[newPath][valindex] = {};
						} else {
							tmp = tmp[newPath][valindex];
						}
					}
				} else {
					if (typeof tmp[path[i]] == "undefined") {
						tmp = tmp[path[i]] = {};
					} else {
						tmp = tmp[path[i]];
					}
				}

			}

		tmp[path[i]] = val;
}

$(document).ready(function() {
  $.each($("input"), function() {
		addValueToObj(myObj, $(this).attr('name')+"="+$(this).val());
  })
  console.log(myObj);
})