Interesting... Yes, you certainly could, using an array.
// as ordered array
var some_arr = []
for (var read in recentTwoReads) {
var some_value = // insert whatever you need here
Push(some_arr, some_value)
}
After the for loop, the some_arr array will have as many values in it as there were features in the recentTwoReads featureset. These can then be accessed by index, i.e., "some_arr[0]", etc.
If you want to store multiple variables per iteration, you can do that with dicts:
// as ordered array of dicts
var some_arr = []
for (var read in recentTwoReads) {
var some_dict = {
some_value: // insert whatever you need here
another_value: // something else
}
Push(some_arr, some_dict)
}
From that, you can access specific values for each iteration: "some_arr[0]['some_value']".
It can get quite complex if you need it to.
- Josh Carlson
Kendall County GIS