Not able to use dashboard variables in JSONAPI fields

Using Grafana 9.4.7

In the configuration of my JSON datasource plugin, I am trying to use dashboard variables explained in this documentation

Here is my JSON that I am getting when I call my JSON API.

    "values": {
        "M-20220630-XXXXXX YYYYYY": [
        "D-20231011-XXXXXX YYYYYYY": [

I am trying to get one specific element from the “values” object using a variable called “scoping” that I set via a drop down list. But this variable contains only one part of the element, lets say I selected “D-20231011”. So I need a “like” operator here that will allow me to get the object “D-20231011-XXXXXX YYYYYYY”.

I tried the followings looking to the documentation

values.$keys()[$contains($, ${scoping:value})]

But I get the error message
“Key in object structure must evaluate to a string; got: undefined”

And when I tried the followin

values.$keys()[$contains($, $scoping[0])]

I simply get nothing on my pannel.

When I try a hardcodded substring instead of the variable, like

values.$keys()[$contains($, 'D-20231011')]

It works fine

I found the following discussions and topics that seems to be related, but they are both without answers, so now I doubt if this is really possible.

Can anyone please help me point to the correct direction ?