Check whether an event has a certain note or comment inside the event page?

And if so to get this Event's ID.

I played around a bit with:
var comments = this.getEventComments();
if(comments.match("") {

script calls, but nothing really worked for me.
for the notetag it would be easiest to use the meta function described in the help file under plugin specifications.

if you want to get the event ID back you'll have to use that function in a loop over all event ids and return the IDs where it found the correct note.
Okay, I think I found it.
$dataMap.events[eventId].meta['your_notetag']
Not going to close the thread yet, gotta test it first.
Thread closed
(Per OP's request via Report)

Original thread: https://forums.rpgmakerweb.com/threads/check-whether-an-event-has-a-certain-note-or-comment-inside-the-event-page.137171/