Accessing selection direction on an input element error Accessing selection direction on an input element error json json

Accessing selection direction on an input element error


$(".save").on('click', function(){              var lhb = [], csb = [], cons = [], vb = [],        txt = $("#accordion").find('textarea').val();    $('.lh:checked').each(function(){         lhb.push($(this).val());     });    $(".cs:checked").each(function(){         csb.push($(this).val());     });    $(".cons:checked").each(function(){         cons.push($(this).val());     });    $(".vul:checked").each(function() {         vb.push($(this).val());     });    var scenario = {         "textArea" : txt,        "lbs" : lhb,        "cbs" : csb,         "cs" : cons,        "vs" : vb    }    var cardId = $(this).parent().attr('id');    save(cardId, scenario);    retreive(cardId);});

you have syntax error in scenario object, after txt there is no ',' also you didn't used correctly the serialize function, and wrong assignments in scenario objects