building javascript output loop for flavors