There is a global object that I am trying to fill in on the front by collecting data from the checkbox to be sent north.
<input class="a" type="checkbox" name="garanty" value="true"> <input class="a" type="checkbox" name="power" value="10kVt"> <input class="a" type="checkbox" name="power" value="5kVt"> Js
var filter_data = { items: [] }; $('.a').change(function(){ if (this.checked == true) { var attr_data = []; filter_data.items.push({ taxonomy: this.name, terms: attr_data, }); attr_data.push(this.value); console.log(filter_data.items); } }); The output should be object for php
$obj = array( array( 'taxonomy' => 'movie_janner', 'terms' => array( 'action', 'comedy' ), ), array( 'taxonomy' => 'actor', 'terms' => array( 103, 115, 206 ), ) );
php, secondly, how it does not correspond to the layout that is in question. What isNOT INand where does it come from? - ThisMan