grails - How to pass variable holding a value to groovy eq query? -


how can pass variable holding value instead of passing value directly groovy search criteria?

for (def payee in payees) {     def results = resp.cases.find("eq 'hrid','7547') // hard code values work     def results = resp.cases.find("eq 'hrid',??????) // how can pass payee } 

i'm new this. please help.

basing on examples, check it:

def results = resp.cases.find { case -> case.hrid == payee } 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -