Pretest script to set horizon and count before query

PHOTO EMBED

Fri Jul 09 2021 08:23:31 GMT+0000 (UTC)

Saved by @jaabsaxo

var hIndex = Number(pm.collectionVariables.get("h-index"));
var cIndex = Number(pm.collectionVariables.get("c-index"));

var horizons = JSON.parse(pm.collectionVariables.get("horizons")); 
var counts = JSON.parse(pm.collectionVariables.get("counts")); 

var h = horizons[hIndex];
var c = counts[cIndex];

pm.environment.set("h", h);
pm.environment.set("c", c);
content_copyCOPY