Your request is almost correct, there are 2 minor problems.
1) TO_BOOL () are the characters for starting the correction function, now you want to insert a subquery that starts by transferring the AQL instruction to the function (). Therefore, instead of TO_BOOL (AQL) you should use: TO_BOOL ((AQL));
2) n.readed - a JSON object, FOR x IN expects a list. When you repeat the n.readed attributes, you can use ATTRIBUTES (n.readed) here.
Here is the right solution for your example:
FOR n IN Notifier LET usersFound = TO_BOOL( (FOR user IN ATTRIBUTES(n.readed) FILTER user == 'user_8' LIMIT 1 RETURN user) ) FILTER usersFound==true RETURN n
PS: If you are only looking for an attribute and do not want to do further filtering, you can get this a little easier using HAS:
FOR n IN Notifier LET usersFound = HAS(n.readed, 'user_8') FILTER usersFound==true RETURN n
source share