Recursive function and json object
// Recursively print all properties of a JSON object function printAllVals(obj) { for (let k in obj) { if (typeof obj[k] === "object") { printAllVals(obj[k]) } else { // base case, stop recurring console.log(obj[k]); } } }
Source: blog.boot.dev