const data = {};
const $inputs = $('.js-input input[name^=params]:nth-child(odd)');
$inputs.each(function() {
const $first = $(this);
const $second = $first.next();
const regexp = /\[(\d+)\]\[(.+?)\]/;
const [, value, name] = $first.attr('name').match(regexp);
const [,, id] = $second.attr('name').match(regexp);
data[value] = {
[name]: $first.val(),
[id]: $second.val()
};
});