I have some codes
var weibo = { weibo: { url: '//testurl.com', icon: 'fa fa-weibo' } }
var mail = { mail: { url: '//testurl.com', icon: 'fa fa-envelope' } }
var github = { github: { url: '//testurl.com', icon: 'fa fa-github' } }
var [key] = Object.keys(weibo)
var name = weibo[key]
console.log(weibo[key])
I want to get object from weibo and store into name variable
But name show [object object]
I am not use alert from What does [object Object] mean? (JavaScript)
I just want to store variable into name, why chrome dev tools show [object object]?
console.log() works, it show corrent object info

Update please see my gif



keyvariable when you're defining it!Version 69.0.3497.100 (Official Build) (64-bit), I also think it should works, It's a bug or not? I copy your codes and run in my chrome dev snippet, but first console.log() show [object object], But when I open my dev tools, your codes have correct logs in my consolearray destructuring. I think it same asvar key = Object.keys(weibo)[0]