showing results for - "find all objects in different levels of json"
Sheldon
04 May 2019
1const iterate = (obj) => {
2    Object.keys(obj).forEach(key => {
3
4    console.log(`key: ${key}, value: ${obj[key]}`)
5
6    if (typeof obj[key] === 'object') {
7            iterate(obj[key])
8        }
9    })
10}
11
similar questions