That would be so epic!
But yes the problem arises that a block doesn’t know whether it has children
We could try and count the children blocks in the where and give that number to the result and then add an assoc with if statement in the result-transform… but… idk if that will even work.
For counting see this post for some ideas:
If statements are possible in the result-transform, but I don’t have an example of the top of my head.