I don't work much with Datavse, but I had an "old" flow that I wrote to get the Option set text and value as a JSON object. You should be able to modify it to suit your needs. It produces the following object:
{
"Apple": 544500000,
"Pear": 544500001,
"Banana": 544500002,
"Mango": 544500003
}
If you specify a property, it will return the option set value:
outputs('Compose_Mapped_Table_2')?['Apple'] ---> 544500000
outputs('Compose_Mapped_Table_2')?['Mango'] ---> 544500001
outputs('Compose_Mapped_Table_2')?['Banana']---> 544500002
outputs('Compose_Mapped_Table_2')?['Pear'] ---> 544500003



/api/data/v9.1/GlobalOptionSetDefinitions(Name='crc37_fruitchoice')

"UserLocalizedLabel": item()['Label']['UserLocalizedLabel']['Label']
"Value": item()?['Value']
Select Value 2 produces:
[
{
"UserLocalizedLabel": "Apple",
"Value": 544500000
},
{
"UserLocalizedLabel": "Pear",
"Value": 544500001
},
{
"UserLocalizedLabel": "Banana",
"Value": 544500002
},
{
"UserLocalizedLabel": "Mango",
"Value": 544500003
}
]

item()?['UserLocalizedLabel']
item()?['Value']
The Select Value 2 produces:
[
{
"Apple": 544500000
},
{
"Pear": 544500001
},
{
"Banana": 544500002
},
{
"Mango": 544500003
}
]

json(replace(replace(replace(string(body('Select_Key_Value_Pairs_2')),'[',''),']',''),'},{',','))
The expression converts the previous output into a JSON object:
{
"Apple": 544500000,
"Pear": 544500001,
"Banana": 544500002,
"Mango": 544500003
}
There is also another method that uses the String Maps Table.
Hope this helps.
Ellis