How can I tell whether a deep-seated key exists in an object in js?

for example, the value I finally want to get is a.b.c.d.e , when the data structure is fixed:

    Is there a more elegant way to write
  1. except for judging step by step, a & a.b & & a.b.c & & a.b.c.d ?
  2. if one of these levels is an array, for example, I need a & A.B & & a.b.c & & a.b.c [0] in this case
Nov.27,2021

js object gracefully take a depth value? you can refer to


technically, if the following code appears multiple times in the code, try using a function instead.

  

your question is too broad.
but one thing is that the existence of deep-seated key can only be judged step by step (recursively)

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