I need to do this select:
Object
- Children
- Children 2
-- Children
--- Test
-- Children 2
--- Test
---- Test
--- Test 2
I have array of objects. Each objects can be children. In these children may also be a child, etc.
@edit:
Ok, but how do the loop? I do not want to do this because the number of children in children can be unlimited:
$(myArray).each(function() {
if ($(this).children.length > 0) {
$(this).children.each(function() {
if ($(this).children.length > 0) {
...
...
...
}
});
}
});
