I have a logstash script
filter {
json{
source=>"message"
target=>"dat"
}
split {
field => "[dat]"
}
split {
field => "[dat][friends]"
}
}
json message is :
[
{
"_id": "5aaf44772d97f524d9d11519",
"index": 0,
"guid": "ba92bd1b-5f5c-448f-9cc3-0462e51d5d32",
"isActive": false,
"tags": [
"amet",
"aliquip",
"veniam",
"officia",
"incididunt",
"do",
"tempor"
],
"friends": [
{
"id": 0,
"name": "Tami Rodriguez"
},
{
"id": 1,
"name": "Amalia Whitehead"
},
{
"id": 2,
"name": "Welch Molina"
}
]
}]
similar values are present i gave a single json
I get the following warn:
[2018-03-19T12:16:05,609][WARN ][logstash.filters.split ] Only String and Array types are splittable. field:[dat][friends] is of type = NilClass