Here is a snippet of the code I am working with:
const { person: { name, age }, house: { height } } = myObject;
// Works
console.log(name);
// Does not work
console.log(person);
The issue arises when I need to have both an individual variable name
, nested within person, and a separate variable person
.