Query binding transform: extract data from dataset

Hello
i'm stuck in searching and cannot find a post. Perhaps just wrong searching
I have a named query which is giving following result:

[{"substring":"2024-02-09","payern1":"User Info"}]

I need to use 2024-02-09 in a label and User Info in another. I know there is a fast solution but I'm not able to find it.

Thanks to everybody

Bind each label to the query and use an expression transform in each.
{value}[0]['substring']
{value}[0]['payern1']

How it works:
The query is returning a list (array) signified by the [ ]. We access the dictionary by the list index [0].
The list contains only one element, a dictionary with two key-value pairs. You retrieve the value by referencing the ['key'].

3 Likes

thanks man
it works perfectly
Just to know: what if I'll need to do it using a script transform?

Show your use case when the time comes. We'll be all over it!

1 Like