Typescript Last Index Of String Javascript Methods For Querying