the user will provide a specific email address. in this case, varEmail = "admin@domain-name.onmicrosoft.com". now I have to check this on the web page list programmatically. I should be able to return the exact match of the user defined email address on the web page list.
Currently, I have these (2) email addresses on my trial environment.
I am also using this Javascript to get one of the email in the web page list.
(Array.from(document.getElementsByClassName("ms-List-surface")[2].getElementsByClassName("ms-List-cell")).filter(name => name.textContent.match(/admin@domain-name.onmicrosoft.com/)))
how ever I am getting 2 output instead of the exact user define email address. Output: psi-admi@domain-name.onmicrosoft.com admin@domain-name.onmicrosoft.com
I am hoping that there is someone here will noticed my post and help me on this. thank you all in advanced!
Just an update, Here's what I've tried so far.
Array.from(document.getElementsByClassName("ms-List-surface")[2].getElementsByClassName("ms-List-cell")).filter(acct => acct.textContent === 'admin@domain-name.onmicrosoft.com');
Return Empty Empty Result
By the way, below is the screenshot of the page from where I need to get the Email/Account. Compliance New Content Search