Yq Loop Through Array Javascript Is Not A Constructor