//To get an object's key by index, call the Object. keys() method //to get an array of the objects keys and use bracket notation //to access the key at the specific index, e.g. Object. keys(obj)[1] . myobj[Object.keys(myobj)[0]];