Forum Discussion

vinodkumar_chau's avatar
vinodkumar_chau
Contributor
10 years ago

How to create Mapped object Structure in JScript

Hi All,    I have below mentioned Object of Variables inside TestValues which are initially uninitialezed var TestValues = {name: "", ID: "", BaseNo: ""};     . After reading the values from be...
  • k_de_boer03's avatar
    k_de_boer03
    10 years ago

    I only hardcoded that to give an example. 

     

    It could be something like:

     

    var name, ID, BaseNo;
    
    for(var i=0; i<totalPropertyNodes;i++){
      name = GetNameFromXml(); 
      ID = GetIDFromXml();
      BaseNo = GetBaseNoFromXml();
    }
    
    new Property(name, ID, BaseNo)

    Then it is no longer hardcoded.

     

    I am not sure how you get the values from the xml, and I still don't quite understand the result you are expecting.