You can do this with a recursive function to traverse the entire object. Just make sure that the object doesn't have any circular references...
const user = {
id: '123abc',
info: {
age: 12,
bio: 'This is my bio'
},
social: {
chatName: 'Chris',
friends: ['friend1', 'other
…
Top comments (0)