Issue with Extract fields

Hello

I use Grafana 10.2.2

I am trying to extract a value from a JSON object

I have something like that :

{
    "_id": "epB66o0BZ5Ji4NATaI-2",
    "_index": "maas_prd-whiteapp-000003",
    "_type": "_doc",
    "correlation_id": "c1f95859-a1d9-46a1-a08a-96c5e6dfe8e9",
    "description": "",
    "details": {
        "task_params": {
            "args": "['e2d8d1ca-803b-4058-b290-42f0fb5870f0', 'backend_log', 'bbox_202402271200_1']",
            "kwargs": "{'correlation_id': 'c1f95859-a1d9-46a1-a08a-96c5e6dfe8e9'}"
        },
        "task_state": "SUCCESS"
    },
    "timestamp": [        "2024-02-27T12:11:33.087Z"    ]
}

When i use the tranformation " Extract fields" with this

path : details.task_params.args[2]

I get only one char “e” !! it’s the third letter

how can i do to get the third field : bbox_202402271200_1

Thanks

regards

DMA

yes that is the 3rd value with 0 based element
details.task_params.args[2]

0,1,2
[ ' e

try using jsonata

1 Like