Typescript Convert Json Object Into Javascript Interview Question