How can I nest entire event inside a single json field while remapping in vrl? #22035
-
Before: {
"field1": "val1",
"field2": "val2"
} After: {
"event": {
"field1": "val1",
"field2": "val2"
},
"event_type": "type1"
} I tried this but doesn't seem to work as expected transforms:
restructure_event:
type: "remap"
inputs:
- "input1"
source: |
.event = .
.event_type = "type1" Edit:
I am able to nest but need a way to delete all fields except "event" and "event_type" |
Beta Was this translation helpful? Give feedback.
Answered by
sainad2222
Dec 16, 2024
Replies: 1 comment
-
Thanks to |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sainad2222
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to
britton
on discord