let math = {
subject: '數學',
children: [
{ id: 1, title: '數一' },
{ id: 2, title: '數二' },
{ id: 3, title: '數三' },
{ id: 0, title: '待定' }
]
}
// 取對象的屬性個數
Object.getOwnPropertyNames(math).length;
Object.keys(math).length;