2 Replies Latest reply on Oct 12, 2010 10:32 PM by vineet osho

    How to access a Access array in flex

    vineet osho Level 1

      Hi

            Guys can any body explain me how to access an array.Actually i am succsufully getting value from array named Dynamic array.

                         DynamicArray[i].language_1[0].translation;

       

      here the node language_1 is not static it may be language_2 or language_3 or language_4 ect.. so i put that getting value in a variable named key

       

      var key:String = 'language_1'; //Suppose i am getting right value here in key

       

      So please guide me how i access my dynamic array using key so that i got same value as previous code give.

       

      i already tried:-DynamicArray[i].key.translation;

                             DynamicArray[i][key].translation;

      but every time got error.

       

       

      for more clarity i put array structure here

       

      DynamicArr= Array (@43b1271)   
          [0] = Object (@43ad219)   
              contentlanguage_1 = Array (@43b1431)   
                  [0] = Object (@4417a11)   
                      choice_id = "0"   
                      deleted = "N"   
                      downloadurl = "http://94.126.48.105:80/cgi-bin/WebObjects/DataVit.woa/wa/Download/getImage?imageId=1281&f ilename="   
                      selected = "Y"   
                      translation = "2_486"   
                  length = 1   
             
          [1] = Object (@4417949)  

       

       

      please Help me out

       

      Thanks In Advance

         Vineet Osho