Transforming structure #21472
Answered
by
jszwedko
CR-OrenYekutieli
asked this question in
Q&A
Transforming structure
#21472
-
Hi, I want to covert incoming messages like:
to:
that is, only to alter the "feature" field from the above array to an object with the key "fields" that will hold a representation of the array items.
The thing is that the "{{ key }}" is not transformed to the variable name and left as "{{ key }}". |
Beta Was this translation helpful? Give feedback.
Answered by
jszwedko
Oct 10, 2024
Replies: 1 comment 1 reply
-
Hi @CR-OrenYekutieli ! For setting dynamic keys, the
See https://vector.dev/docs/reference/vrl/functions/#set for details. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
CR-OrenYekutieli
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @CR-OrenYekutieli ! For setting dynamic keys, the
set
function must be used like:See https://vector.dev/docs/reference/vrl/functions/#set for details.