Javascript attribute detection

how to encapsulate a method that implements the following functions

let a = element["a"]["b"]["c"]...["n"]
let a = element["a"]&&element["a"]["b"]&&element["a"]["b"]["c"]&&...&&element["a"]["b"]["c"]...["n"];
let a = checkObject(element["a"]["b"]["c"]...["n"]);
checkObject(){
    // 
}
Apr.16,2021

function checkObject(obj, paramList){
  if(paramList == null || paramList.length === 0){
    return true
  }
  var prop = paramList.shift()
  return obj[prop] !=null && checkObject(obj[prop], paramList)
}

var _obj = {
  a: {
    b: {
      c: {
        d: true
      }
    }
  }
}

console.log(checkObject(_obj, ['a', 'b', 'c']))
console.log(checkObject(_obj, ['a', 'c', 'b']))

lodash/get find out, _ .get (obj, 'a.b.c.d.e.f.grub, undefined)

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-1b39508-2c178.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-1b39508-2c178.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?