How to extract all the queryaprams names and values in javascript.
I tried below snippent but unable to fetch value of that queryparam dynmically.
var queryParams = context.getVariable('request.queryparams.names');
var count = context.getVariable('request.queryparams.count');
var queryString = context.getVariable('request.querystring');
if(count > 0){
var queryParamsArray = queryParams.toArray();
var first = queryParamsArray[0].toString();
print(context.getVariable('request.queryparam.type'));
print(queryParams[first]);
print(context.getVariable('request.queryparam['first']'));
}else{
context.setVariable('badQuery',"false");
}
the print statement is not prinitng value of queryparam type. Any help would be really appreciated
@akshay.anand9 , Can you add a sample URI & What exactly you would like to see as an output in the print statements ? Below code is not a valid syntax in Apigee,