I'm trying to dynamically generate an array arrays . For example:
check = function (title, filter) {
if (checked.indexOf(title) !== -1) {
checked[title].push(filter);
} else {
checked.push(title);
}
};
check('arraypai','conteudo');
check('arraypai','outroconteudo');
So the result would be:
[
arraypai[conteudo,outroconteudo]
]
and then ...
check('arraymae','coisa');
check('arraymae','outracoisa');
and the result would be:
[
arraypai[conteudo, outroconteudo],
arraymae[coisa, outracoisa]
]