JS Получите первое значение объекта
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 = { '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'