var object = { list228: 1, otherList: { otherOtherList: { otherOtherListItem1: 1, otherOtherListItem2: 'blue' }, otherOtherListItem1: 'red' } }; 

the result should be

  "listItem1" "subList > subSubList > subSubListItem1" 
  • console.log (object) before the condition that shows? - Alexus
  • the same as in the condition), but how to get out of there? - oleja
  • what did you specifically try to do (where is the program code)? - Alexus
  • display all elements with a unit - oleja
  • you need to go through all the properties of the for (prop in object) object. Moreover, each property can also be an object, ie, the function will be recursive. You will need to store the "current path". When browsing, when you go into the sub-object you will need to add a "sub-object" to the current path. This path will need to be used for your result - Alexus

0