get first object key javascript

JavaScript
var example = {
    foo1: { /* stuff1 */},
    foo2: { /* stuff2 */},
    foo3: { /* stuff3 */}
};

let [first] = Object.keys(example)

console.log(first)
Source

Also in JavaScript: