Swap character shapes in variable fonts

Is it possible to have a characters swapping shapes in a multi-axis variable font?
I’m talking about those classic situations like the Dollar changing to a broken-bar-Dollar when it becomes too bold.

Many thanks!

That can be done with bracket layers: https://glyphsapp.com/tutorials/alternating-glyph-shapes

Thanks. Will the substitution work on a variable font?
The tutorial says “The bracket tricks only work in single-axis set-ups” was there an update to this?

It works.
Just braket AND brace layers combined are not working in a variable font