I've pulled data from a SQL database that gets put into a field like below.
"assignment": [
{
"assignedto": "1234",
"assignedtoname": "John Doe",
"assignedgroupid": 1
}
]
I'm using the following JSON config in my pipeline.
if [assignment] {
json {
source => "[assignment][0]"
target => "assigned"
}
}
This results in the following error. What am I doing wrong?
[WARN ][logstash.filters.json ] Error parsing json {:source=>"[assignment][0]", :raw=>{"assignedto"=>1234, "assignedtoname"=>"John Doe", "assignedgroupid"=>1}, :exception=>#<Java::JavaLang::ClassCastException: >}