Hi Chandar,
You don't really explain what you are trying to achieve here, and you don't show what your data set looks like, so it is hard to give a concise solution.
For the purposes of this comment, I will be assuming your original data is a multidimensional array (since you are trying to loop through it), and that it looks something like this:
In this case, the following code would convert that multidimensional array into a ValueMap. However, as Bill meswi01 mentioned, a ValueMap field name must be a valid JavaScript variable name, so you can't use /, -, or start it with a number.
In my example, I am prepending the start of the variable name with date_ and replacing your / with an _ (as you can use underscores).
[code]
var valuemapDates= newValueMap();
for (var i=0; i < Process.dateArr.length; i++) {
var tmp_finaldate = Process.dateArr[i][1] + "/" + Process.dateArr[i][0] + "/" + Process.dateArr[i][2];
var TmpVM_Name = "date_" + Process.dateArr[i][1]+"_"+Process.dateArr[i][0]+"_"+Process.dateArr[i][2];
valuemapDates[TmpVM_Name] = tmp_finaldate;
}
Process.valuemapDates = valuemapDates;
Process.ValueMapNames = getValueMapFields(Process.valuemapDates);
Process.ValueMapDates = valuemapDates;
[/code]
The resulting ValueMap would look something like this:
However, since ValueMaps are not indexed, you won't be able to access the list of ValueMap names directly, you will have to use getValueMapFields to put the field names into an indexed array, and use those names to access the ValueMap.
So depending on what you plan on doing with the data, it might just be easier to store the values in a normal array which would look like this:
[code]
var normalarray = [];
for (var i=0; i < arr.length; i++) {
normalarray.push(Process.dateArr[i][1] + "/" + Process.dateArr[i][0] + "/" + Process.dateArr[i][2]);
}
Process.arrayDates = normalarray;
[/code]
I hope this helps you on your way.
Ian