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);