If i understand, it is not possible to select JSON { } in button and access a global. It would be possible if the button node had access to JSONata library.
Only way is to set the global in the button and a topic then use change node to move items and buttn value., as below
[{"id":"240a26c1.496232","type":"inject","z":"8d22ae29.7df6d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":80,"y":2460,"wires":[["bb5afb61.3ebe"]]},{"id":"bb5afb61.3ebe","type":"ui_button","z":"8d22ae29.7df6d","name":"","group":"165e1e1a.e752fa","order":6,"width":0,"height":0,"passthru":true,"label":"1","tooltip":"","color":"","bgcolor":"","icon":"","payload":"GlobalRoom","payloadType":"global","topic":"button1","x":240,"y":2460,"wires":[["f08bf02b.ca85c8"]]},{"id":"f08bf02b.ca85c8","type":"change","z":"8d22ae29.7df6d","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.room","tot":"msg"},{"t":"set","p":"payload.button","pt":"msg","to":"$substring(topic, -1)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":2480,"wires":[["b7b4d5d5.c27648"]]},{"id":"8d70060b.ac9808","type":"ui_button","z":"8d22ae29.7df6d","name":"","group":"165e1e1a.e752fa","order":7,"width":0,"height":0,"passthru":true,"label":"2","tooltip":"","color":"","bgcolor":"","icon":"","payload":"GlobalRoom","payloadType":"global","topic":"button2","x":230,"y":2500,"wires":[["f08bf02b.ca85c8"]]},{"id":"b7b4d5d5.c27648","type":"debug","z":"8d22ae29.7df6d","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":690,"y":2440,"wires":[]},{"id":"3ccef7dc.ffadf8","type":"inject","z":"8d22ae29.7df6d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":80,"y":2500,"wires":[["8d70060b.ac9808"]]},{"id":"7691e4a9.e46244","type":"ui_dropdown","z":"8d22ae29.7df6d","name":"","label":"","tooltip":"","place":"Select option","group":"165e1e1a.e752fa","order":8,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"room 1","value":"room 1","type":"str"},{"label":"room 2","value":"room 2","type":"str"}],"payload":"","topic":"","x":260,"y":2400,"wires":[["b7b4d5d5.c27648","6c7bc84b.a6499"]]},{"id":"6799842e.87b524","type":"inject","z":"8d22ae29.7df6d","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"room 1","payloadType":"str","x":80,"y":2400,"wires":[["7691e4a9.e46244"]]},{"id":"6c7bc84b.a6499","type":"change","z":"8d22ae29.7df6d","name":"","rules":[{"t":"set","p":"GlobalRoom","pt":"global","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":2400,"wires":[[]]},{"id":"165e1e1a.e752fa","type":"ui_group","z":"","name":"Default","tab":"f9b58883.fa613","order":1,"disp":true,"width":"12","collapse":false},{"id":"f9b58883.fa613","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]