all the query(including js query) is async which means you need to use keyword await in your javascript expression. but it not support in the place where need the value.
I have a feature request here Is possible to use await in js expression?
Here is screenshot if you use JS query,
transformer is just return a value but can't access the value you pass to it.
Function is what you want.
Here is app json


