Hello,
I have this JSON
{
"users":"[{"id":1,"name":"bob"},{"id":2,"name":"alice"},{"id":3,"name":"david"}]",
"date":"23/01/2017"
}
even if I'm using the logstash filter:
filter {
split {
field => "users"
}
}
the message is stored in elastic as single event
users => [{"id":1,"name":"bob"},{"id":2,"name":"alice"},{"id":3,"name":"david"}]
date=> 23/01/2017
question1: how I can convert the user field from string to a json array to have this
"users":[{"id":1,"name":"bob"},{"id":2,"name":"alice"},{"id":1,"name":"david"}],
"date":"23/01/2017"
}
question 2: how I can store this nested json as a multiple json events in elastic
Expected output:
{
"id":1,
"name":"bob",
"date":"23/01/2017"
}
{
"id":2,
"name":"alice",
"date":"23/01/2017"
}
{
"id":3,
"name":"david",
"date":"23/01/2017"
}
Thanks in advance for your answer