How to parse JSON with an existing variable?

I have a variable that contains the following: 8axasa-sd82-s9a0.

The data comes out like this:
["8axasa-sd82-s9a0"].page_id["8axasa-sd82-s9a0"].value[0]

When I do:
["<spaceid>"].page_id["<spaceid>"].value[0]

I get an error:

## JsonException

Unexpected character while parsing path indexer:

I tried escaping the - and I still get an error.

UPDATE: I thought about a temporary solution and it’s working but still want to know how to do it properly.

My solution was to replace all with literally “spaceid”. I think the problem was with the or something.

Try To Parse It two times and rename it
spaceid1
spaceid2
and put this like that

[""].page_id[""].value[0]