How using .query stack in REST API?

Amm0, title of the post has taken on a different meaning, now this is an expanded version of your previous instructions.

Block that uses indexes pushes the result to the top of stack, clearing the entire stack - all expressions unused before this step will be lost. Operations & and | can be applied to indexes, but it is difficult to understand the priority and logic of the actions performed. The only thing that is clear is that if something goes wrong, the expression is written with an error, then the system will return either all addresses from the firewall lists (accessing a non-existent index), or result of the last index in expression (syntax or procedure error).
“#.” creates a copy of the top of stack - this is an interesting feature that can be used to construct complex expressions.

For some reason, I have never encountered such an approach with a stack to organizing logical calculations before. Really liked its simplicity of implementation, will use it in my projects when need to be able to set the behavior of an object by user in settings.