console.dir
の第2引数にオブジェクト{depth: null}
を渡すと深い階層も省略されずに全部見れます。
const menu = {
main: {
currey: 500,
udon: 450,
rice: 150
},
side: {
soup: {
misoshiru: {
wakame: 250,
asari: 250
},
potage: {
corn: 250,
potato: 250
}
},
dessert: {
icecream: {
vanilla: 100,
chocolate: 100
}
}
}
}
console.log(menu)
/*
{
main: { currey: 500, udon: 450, rice: 150 },
side: {
soup: { misoshiru: [Object], potage: [Object] },
dessert: { icecream: [Object] }
}
}
*/
console.dir(menu, {depth: null})
/*
{
main: { currey: 500, udon: 450, rice: 150 },
side: {
soup: {
misoshiru: { wakame: 250, asari: 250 },
potage: { corn: 250, potato: 250 }
},
dessert: { icecream: { vanilla: 100, chocolate: 100 } }
}
}
*/