I need to get all element except first with Cheerio
. So I select all and then try to delete first but after when I try to loop elements I get error that first element undefined...
var categories = $('.subtitle1');
console.log(categories.length);
delete categories[0];
delete categories['0'];
console.log(categories.length);
categories.each(function(i, element) {
console.log(element.children);
});
Result:
15
15
TypeError: Cannot read property 'children' of undefined....
If I comment delete...
everything works fine except that I have first element.