Can we use map in the Execute Javascript assertion?
I have used the below code snippet. I have defined a context variable country = abc
var country = context.getVariable('country');
var countryMapping = new Map();
countryMapping.set('abc',1);
countryMapping.set('def',2);
countryMapping.set('fgh',3);
var flag = countryMapping.has(country);
context.setVariable("flag", flag);
if(flag){
var code=countryMapping.get(country); }
else {
var code='Others';}
context.setVariable("code", code);
Request your help at the earliest.