Nested json parsing dynamic types

I am parsing json format log message and that structure is dynamic. Example
if i parse the log message some like {"file":"this is sample file"} parsing works fine and can search the log also in kibana.

Then tried to parse the log message something like {"file":{"name":"sample.txt","size":"32kb","type":"pdf"}}

This time it fails and throws exception like
MapperParsingException[failed to parse [file]]; nested: IllegalArgumentException[unknown property [name]]

Please advise how i can fix this issue and parse the dynamic nested json in the logstash.

Appreciate your help.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.