JSON forEach get Key and Value May 9, 2023 by Tarik Use index notation with the key. Object.keys(obj).forEach(function(k){ console.log(k + ' - ' + obj[k]); });