Typescript Find Index Of Element In String Sql Query