I'm stuck in javascript
I've been stuck in one part about couple months now because i just lost my motivation with it. It may sound like a simple problem but it's not. So i wish you guys could help me out. I have this big array which is like a windows directory. You have one folder and inside the folder you have your files and more subfolders etc ... So the array represents a tree of the main folder and all files and folders inside it. This is what i mean http://filext.com/images/filetree.gif We can't know how many files and subfolders there is and I need to loop them all through { "index.html": { "type": "file", "content": "<h1>Help me</h1>" }, "javascript": { "type": "folder", "content" : { "main.js": { "type": "file", "content": "alert('test')" }, "jquery": { "type": "folder", "content": { //More folders and files } } } } } The key is the name of the file or folder like "index.html" or "javascript". If the key is a folder the content contains the files and subfolders inside it. I hope you understand Sorry for my english.