I am hoping I am missing something obvious here, but I have tried for the past half day to set two variables to combine in a certain format in Javascript I can do it as a string, however I need it in a different format.
If I select on option from the check boxes {"GILLS":"7"} works fine however if two options are selected query1 should look like [{"GILLS":"1"},{"GILLS":"7"}]. I cannot use += to the variable as this kicks out an unexpected token error.
var Query1 = '';
var Query3 = '';
if ($('input[name=checkbox2a]:checked').length > 0) {
var Query3 = {"GILLS":"7"};
}
if ($('input[name=checkbox2b]:checked').length > 0) {
var Query3 = {"GILLS":"1"};
}