How to filter data by relation in Strapi v4

Hey I am developing a JAM stack website in which I have to filter user posts by collection :blush:
My relation is between post and “users_permissions_user” -the deafult user collection of the type one to many

I want to filter all the post by username
I have read this blog but it don’t worked.
My local url:

http://localhost:1337/api/questions?filters\[users_permissions_user\][username][$contains]=johndoe

It returned all the posts

Hey, Have you got any solution to this yet ??

if you are using JS template string then use double back slash before [ , ] . like this…

http://localhost:1337/api/questions?filters\\[users_permissions_user\\][username][$contains]=johndoe