Typescript Get Position Of Element In Javascript Object To Json