i would like to create a Json object using an AND condition (i dont know if its possible). I put the unfinished code that i've by the moment.
var parameters = {
Title : "hello",
Text : "world",
Question : //if two checkboxes are checked then true else false.
}
About the two checkboxes checked i was thinking to use this:
$('.checkbox1').is(':checked') && $('.checkbox2').is(':checked')
What i would like to avoid is to put an if like
//if checkboxes are checked
//{
//create the json object of type 1
//}
//else
//{
//create the json object of type 2
//}
Is this possible?