Need to loop the lines and add condition in query class

Didn’t you already have a solution in your thread Want to add condition in query filter?