Javascript Split String Into Array And Iterate Through Dictionary