Typescript Find Element In Nested Loop