This shows how to use the Function “Ui element property (local)” to get the innerHTML of a Ui element. All relevant information is provided in the following Open Source game example:
https://www.modd.io/play/squisher-ui-015/