Lets say in a given event i have 4 fields
psn1_name (holding the value "A",
psn1_age (holding the value 10,
psn2_name (holding the value "B",
psn2_age (holding the value 20.
I want to create a field person such that person is of the following structure
person = [
{
"name":"A"
,"age":10
},
{
"name":"B"
,"age":20
}
]
Can someone please suggest how to achieve this in the filter section of my logstash configuration.