this page is a view in a RoR project and i need to build this array of arrays using jQuery and JavaScript :
{ {id, mode, val_a, val_b}, {id, mode, val_a, val_b}, {id, mode, val_a, val_b} }
i think my build process is good
var arraytutti = [];
$('.selettoremodo').each(function() {
arraysingolo = [];
work = this.id;
modo = this.value;
orecontabilizzate = $("." + work + "[name='durataore_contab']").val();
minuticontabilizzati = $("." + work + "[name='durataminuti_contab']").val();
arraysingolo.push(work, modo, orecontabilizzate, minuticontabilizzati)
arraytutti.push(arraysingolo)
});
printing in console log the main array with "console.log(arraytutti)" i have this (see picture)
Now i need to pass ALL THIS ARRAY WITH STRUCTURE to a field, but using $("#appoggio").html(arraytutti.toString());
or
$("#appoggio").html(arraytutti);
i have something like
389,2,3,0,391,2,4,0,393,2,0,24,395,2,8,41
i need the full array's structure so i can pass the field by post and analize the data from the controller,
how can i solve?

JSON.stringify(arraytutti)????