for (const [index, item] of athAtvArr.entries()) { krpano.call("set(hotspot[" + spotname + "].point["+index+"].ath," + item[0] + ");"); krpano.call("set(hotspot[" + spotname + "].point["+index+"].atv," + item[1] + ");"); }