I just create a hidden multiple choice question with the same amount of subquestions. I will auto answer the corresponding multiple choice option if the array answer is >= 2 then use the build in array filter.
Below is the exact code of a working version I just made. In this example my array subquestions are numbered a1-a5.
Code:
$(document).ready(function() {
$('#movenextbtn, #movesubmitbtn').click(function () {
var subNum = 0;
//replace the 5 with the number of array rows you have.
for(var i = 0;i < 5;i++) {
subNum = i + 1;
console.log(subNum);
//replace "java936471X86X336a" with your id that stores the array value. You will find it under ".answertext".
if(document.getElementById('java936471X86X336a'+subNum).value >= "2") {
//replace the question number with your multiple choice questions number.
$('#question342 .checkbox:eq('+i+')').attr('checked', true).triggerHandler('click');
}
}
});
});
In the next question use the SGQA code in the array filter option under advanced settings. Be sure to number them the same.