JSFiddle - React, Tailwind, and code Playground

by Sergio Quiñonez

HTML

<form id="data" method="post">
    <input type="text" name="options[11][140]" value="140" />
    <input type="text" name="options[8][99]" value="99" />
    <input type="text" name="options[8][103]" value="103" />
    <input type="submit" name="save" value="save" />
</form>
<div><pre class="result"></pre></div>

CSS

input {
    display: block;
}
.result {
    margin-top: 10px;
}

JavaScript

$('#data').submit(function(e){
    var $post = $(this).serializeArray();

    $('.result').html(JSON.stringify($post));
    console.log($post);
    
    return false;
});