JS otrzymują pierwszą wartość obiektu
var obj = { first: 'someVal' };
obj[Object.keys(obj)[0]]; //returns 'someVal'
GutoTrosla
var obj = { first: 'someVal' };
obj[Object.keys(obj)[0]]; //returns 'someVal'
var person = {"name":"Steve","age":43};
var firstKeyValue = person[Object.keys(person)[0]]; //"Steve"
var person = { 'first_name': 'Johny', 'last_name':'Carson' };
var firstName=person[Object.keys(person)[0]]; //get first value of object :'Johny'
obj = { key:"value" }
Object.values(obj)[0] //returns "value"
let obj = {
first: 'first property value',
second: "hello"};
obj[Object.keys(obj)[0]]; //returns 'first property value'