I’m a beginner here and I have a question…
I have the following structure
{
“tags”:
[
“cat_access”,
“tip_escl”
]
}
I would like to return only the value that starts with “cat_”, so I built the following expression:
{{ $jmespath($json.tags, "[?contains(@, ‘cat_’)][] ") }}
however, the value returned was:
[Array: [“cat_acess”]]
and I would like to return just the value:
cat_access
I tried with the value:
{{ $jmespath($json.tags, “[?contains(@, ‘cat_’)]{tags: tags[0]}”) }}
however it returned empty.