Skip to content

How do i handle an array ? #10726

Answered by spencergilbert
StefanSa asked this question in Q&A
Discussion options

You must be logged in to vote

If I understand correctly you'd want to use append or push.

if exists(.source.ip) {
  .related.ip = push(.related.ip, .source.ip)
}
if exists(.destination.ip) {
  .related.ip = push(.related.ip, .destination.ip)
}

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@StefanSa
Comment options

@spencergilbert
Comment options

@StefanSa
Comment options

@spencergilbert
Comment options

Answer selected by spencergilbert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants