Find a specific string in an unstructured and nested list

Yes, I pointed out exactly this problem at the beginning of the project, but now this decision has been made at higher levels than me
Unfortunately, we have a list that different people in different organizations add a series of parameters to this list based on their taste.
All I have to do is find all the tags and check if the new name I want to insert has already been inserted.

It should be noted, sometimes some added list has no tag that should be avoided or skipped. This is true for children.
I tried to do it with the search string and check it is included whether there is, for example, tag: name or not, but sometimes I need to take this tag and make some changes on it.

That’s why I tried to move this whole list of strings to the macro and check each and every line of it.