so suppose I have this directory:
Root
  includes
    header.php
    footer.php
  css
    images
      logos
        white.svg
        dark.svg
      gallery
        1.jpg
        2.jpg
        3.jpg
        4.jpg
        5.jpg
      contact-page.jpg
    style.css
  js
    jquery.js
    main.js
  index.php
  contact.php
  about-us.php
I'm parsing the directory recursively using this answer from another stack overflow post.
It returns an array with objects with all the files and folders, if it's a folder, then it has a 'children' array with all sub files or sub folders an so.
How can I iterate through this object to render that into HTML using <ul> and <li> elements. I know it must use a recursive function but I can't wrap my head around it. Also, it can use jQuery to append elements.
Thanks in advance!
EDIT: http://pastebin.com/iQ3xbKpC there is the JSON
 
     
    