In the query, I try to access the additional scope as a variable, as seen in some other posts here -- but, as expected by any normal designer, the variable is not defined:
Steps I've taken to troubleshoot:
At first, the query used JSON type (not "raw"), as stated here. It didn't work. This post also seemed to be about this, but from a absotutelly mistaken point of view, as query.data contains the result of the query. Anyway, I also tried this and didn't work out.
I was hoping this wasn't the problem, because in javascript (I don't know since which ECMAScript version, but for many years already) it's equivalent to declare the object { index: index } and the object {index}. So, if it didn't work because of this, it would be because retool is using really old JS or changed its behaviour.