js get first object value
var obj = { first: 'someVal' };
obj[Object.keys(obj)[0]]; //returns 'someVal'
js get first object value
var obj = { first: 'someVal' };
obj[Object.keys(obj)[0]]; //returns 'someVal'
javascript object entries
// Object Entries returns object as Array of [key,value] Array
const object1 = {
a: 'somestring',
b: 42
}
Object.entries(object1) // Array(2) [["a", "something"], ["b", 42]]
.forEach(([key, value]) => console.log(`${key}: ${value}`))
// "a: somestring"
// "b: 42"
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us