Skip to content

Tag: node.js

How to get immediate child of using cheerio

I have html file html content like this : After Loading html content in cheerio module and while searching for immediate li childs it’s getting all items from child ul as well like this : When i print liElements in after converting to html content i am getting output like this : You can see content from…

Nesting for loop automatic

I have a array with objects and those objects consist of some arrays. I wanna loop through the entire array and the array inside the objects. Sound complicated but if you look at the example below it works. However my problem is that right now the length of the variables array is 2, but how can i implement so…