the user will provide a specific email address. in this case, varEmail = "[email protected]". 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(/[email protected]/)))
how ever I am getting 2 output instead of the exact user define email address. Output: [email protected] [email protected]
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 === '[email protected]');
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