you can try using jquery $.ajax to send the data back to the server. This example handles a response back from the server as well.
$.ajax({
url: "<?php echo $html->url( array( 'controller' => 'xxx', 'action' => 'xxx' ), true ) ?>",
dataType: "json",
crossDomain: false,
data: bnds
})
.then( function ( response ) {
$.each(response, function (i, val) {
// do something
});
});
The documentation for ajax is here if you need it https://api.jquery.com/jQuery.ajax/