I've got a workaround using powershell to pull the value from the structure.
powershell.exe -command "$output = $(C:\Progra~2\twiddle\bin\twiddle.bat -s service:jmx:http-remoting-jmx://localhost:9990 get --noprefix jboss.as:core-service=platform-mbean`,type=memory heap-memory-usage | select-string 'used') ; $output -replace '.*used=' -replace '\}.*'"
why don't you collect memory info directly from jdk via jmx? It looks quite bit of roundtrip if you could access jdk's memory info directly.
see more on that at:
on cli topic you are mentioning, starting with version 9, you could use enhanced syntax for reading complex attributes like this.
where command would then look like