Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How do I group values to an array for the same field value in jq

jq 'group_by(.src_ip) | map({src_ip: .[0].src_ip, sessions: map(.session)})'
 
PREVIOUS NEXT
Tagged: #How #I #group #values #array #field #jq
ADD COMMENT
Topic
Name
8+2 =