Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20755

How to create Mapped object Structure in JScript

$
0
0

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 below xml

<?xml version="1.0"?>
<configurations>
<Properties>
<Property name="name1" ID="0" BaseNo="34"/>
<Property name="name2" ID="1" BaseNo="35"/>
<Property name="name3" ID="2" BaseNo="37"/>
</Properties>

</configurations>

 

 , I have to set the values agianst each variable inside TestValues
but the problem is that, there should be only 1 variable for each value. For ex when i read the name from 1st property it is name1 , for 2nd it is name2. how can i have i variable storing more than 1 value.
There is some concept of mapped object structure in Jscript but i dont know how to use. Please help if you know


Viewing all articles
Browse latest Browse all 20755

Trending Articles