Typescript Convert String Into Object In Javascript