Swift Loop Through Array React Js Compiler