Unanswered question

Send NeoloadVariable "variable extractor with all occurance" into Javascript Array Variable?

From server response, I have captured all occurance of Dates in a variable "NL_ExtractArray" Since it has 100 values.
now, I have to access all the content of "NL_ExtractArray" in JavaScript code & find the latest date.

Could you please help me with the example.
Note:
I am able to access one values at a time using "NL_ExtractArray_1".
But not success, while using array and loop function .

JavaScrit Code:
var NLArrayLength = context.variableManager.getValue("C_EffectiveDate_matchNr");
var JSDateArray;
var index;
for ( index=0; index<=NLArrayLength; index++) {
context.variableManager.setValue("JSDateArray_"+index,context.variableManager.getValue("C_EffectiveDate"+index));

logger.debug("ComputedValue_Index="+index);
logger.debug("ComputedValue="+JSDateArray);
}
Neoload Output sample
2021/03/24 13:33:44 DEBUG - neoload.JavaScript.script_2: ComputedValue_Index=0
2021/03/24 13:33:44 DEBUG - neoload.JavaScript.script_2: ComputedValue=undefined
2021/03/24 13:33:44 DEBUG - neoload.JavaScript.script_2: ComputedValue_Index=1
2021/03/24 13:33:44 DEBUG - neoload.JavaScript.script_2: ComputedValue=undefined
2021/03/24 13:33:44 DEBUG - neoload.JavaScript.script_2: ComputedValue_Index=2
2021/03/24 13:33:44 DEBUG - neoload.JavaScript.script_2: ComputedValue=undefined
2021/03/24 13:33:44 DEBUG - neoload.JavaScript.script_2: ComputedValue_Index=3
2021/03/24 13:33:44 DEBUG - neoload.JavaScript.script_2: ComputedValue=undefined

vijaysanthosh K.
vijaysanthosh K.

vijaysanthosh K.

Level
0
23 / 100
points

Answers

vijaysanthosh K.
vijaysanthosh K.

vijaysanthosh K.

Level
0
23 / 100
points

I was able to find the solution myself, :
var NLArrayLength = context.variableManager.getValue("C_EffectiveDate_matchNr");
var JSDateArray =new Array();

//var JSDateArray = new JSDateArray();

var index;
for ( index=0; index<=NLArrayLength; index++) {
JSDateArray[index]=context.variableManager.getValue("C_EffectiveDate_"+[index]);
// context.variableManager.setValue("JSDateArray",);
// context.variableManager.setValue("JSDateArray"+"_"+index,context.variableManager.getValue("C_EffectiveDate"+"_"+index));
logger.debug("ComputedValue_Index="+index); //Neoload Output for each iteration: ComputedValue_Index=0,1,2,.....
logger.debug("JavscriptArray="+JSDateArray[index]); //Neoload Output for each iteration: ComputedValue=undefined
}