Salve a tutti,
ho una domanda riguardo gli oggetti in javascript.
Con "this" si può risalire di un livello e accedere agli oggetti sullo stesso livello del chiamante. C'è un metodo per salire più di un livello così che si possa navigare liberamente anche in strutture più complesse come ad es. questa:
Codice PHP:
var MainObject = {
   
firstLvl1: {
      
target"caio";
   },
   
firstLvl2"tizio",
   
firstLvl3: {
      
secondLvl1"pasquale",
      
secondLvl2"pulcinella",
      
secondLvl3: {
         
thirdLvl1"gianfranco",
         
thirdLvl2: function(){
            
alert(target)
         {
      }
   }

come faccio ad accedere da thirdLvl2 a target? posso farlo relativamente o sono costretto ad un percorso assoluto tipo "MainObject.firstLvl1.target"?

grazie