Class array object, how to get the value of the object

there is such an array [{a: 1}, {b: 30}, {d: 45}, {f: 415}, {cs: 454}];
how can I get the value of d

Mar.03,2021

this is not an array object, this is an array.

function getVal (arrLike, key, fallbackVal) {
  const result = [...arrLike].find(x => typeof x[key] === 'number')
  return result ? result[key] : fallbackVal
}

getVal(arrLike, 'd') // 45
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9f6eb-1a54.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9f6eb-1a54.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?