There is a block of elements with a group of selects:
<div id="options-container"> <div class="input-box"> <select name="option[0][option_id]" class="select-options"> <option value="39367:Erwachsener" selected>Erwachsener</option> <option value="39368:Ermäßigt">Ermäßigt</option> </select> </div> <div class="input-box"> <select name="option[0][qty]" class="qty"> <option value="1" selected>1</option> </select> </div> <div class="input-box"> <select name="option[1][option_id]" class="select-options"> <option value="39369:Erwachsener">Erwachsener</option> <option value="39370:Ermäßigt1" selected>Ermäßigt</option> </select> </div> <div class="input-box"> <select name="option[1][qty]" class="qty"> <option value="1" selected>1</option> </select> </div> </div> With jQuery, you need to collect all the selected elements into an array of this type:
{option:[Object { option_id="39368:Ermäßigt", qty=1}, Object { option_id="39370:Ermäßigt1", qty=1}]} I think there should be something like:
var options_info = []; $('#options-container select').each(function (index, object) { var data = []; . . . options_info.push(data); }) Tell me how to properly collect.