Typescript Select Value From String Split Javascript W3schools