Forum Discussion
HKosova
Alumni
14 years agoHi Amy,
The aqObject.SetPropertyValue method can only be used to assign values to the existing properties; it can't add new properties to objects.
To create a property named after a string value, you can use JScript's square bracket notation:
The aqObject.SetPropertyValue method can only be used to assign values to the existing properties; it can't add new properties to objects.
To create a property named after a string value, you can use JScript's square bracket notation:
This syntax does the same as:
To read cars data from an INI file into objects, you can use a script like this:var iniFileHandle = Storages.INI("E:\\Work\\cars.ini");
var arr = [];
var obj, iniFileSection;
for (var i = 0; i < iniFileHandle.SectionCount; i++)
{
iniFileSection = iniFileHandle.GetSubSectionByIndex(i);
obj = {};
for (var j = 0; j < iniFileSection.OptionCount; j++)
obj[iniFileSection.GetOptionName(j)] = iniFileSection.GetOptionByIndex(j, "");
arr.push(obj);
}