Hi again guys,
I have now got a long list of code, that I would like to iterate - modifying the end of an App.Property key ( which I assume is a "string"),
The code is like this
}else if(Application.getValue("wptn") > 6) {
$.mWaypoints.add(Application.getValue("w7"));
$.mWaypoints.add(Application.getValue("lat7"));
$.mWaypoints.add(Application.getValue("long7"));
}else if(Application.getValue("wptn") > 7) {
$.mWaypoints.add(Application.getValue("w8"));
$.mWaypoints.add(Application.getValue("lat8"));
$.mWaypoints.add(Application.getValue("long8"));
where "wptn" is a number, and is the number of iterations I need to run, starting at 1
I need to be able to add the iteration number to the end of the partial getValue
Do you think this is possible?
for( var i=1; i < (Application.getValue("wptn")+1); i +=1) {
$.mWaypoints.add(Application.getValue("w"+"i"));
}