function LoopOverObject(obj) { for (let prop in obj) { console.log(prop, obj[prop]); // Check if Arry of (numbers or strings) if(typeof obj[prop] === 'object' && Array.isArray(obj[prop]) === true) { for(let arr of obj[prop]) { console.log(">> "+arr); } } // Check if object else if(typeof obj[prop] === 'object' && Array.isArray(obj[prop]) === false) { console.log(obj[prop]); LoopOverObject(obj[prop]) } // print the rest of strings, numbers, boolean else console.log(">>> "+obj[prop]); // else if (typeof prop === String || typeof prop === Number || typeof prop ===Boolean) } }