Group Array By Value Javascript Compiler