0 Replies Latest reply on Jul 14, 2015 9:51 AM by luca cres

    detect Measurement Unit

    luca cres

      I must read all properties of an object and i ceck if it's an array, an object a string or number,to save the type of the data

       

      But when i get the value of Pointsize of font , sometimes it's return an array , sometimes a number

      for example in Paragraph it return a number but in TextStyleRange in return an array

       

      there is a way to check the Measurement Unit objects?

       

      in my exsample if the prop return an array it serialize the data but i want that it return the value

      thanks

      Luca

       

      function CeckricorsivoOggetto(Oggetto){

       

      var NomeProp=Oggetto.reflect.properties

      for(var p = 0;p <NomeProp.length; p++){

       

      if(NomeProp[p] instanceof Array){

          return  serialize(NomeProp[p])

      } else if(NomeProp[p] instanceof Object){

          return CeckricorsivoOggetto(NomeProp[p])

      } else {

         return NomeProp[p]

      }

      }

      }