Typescript Get Index Of Object In Array Javascript Gfg