Parse json data

Parsing nested json in Logstash
below is a sample of my file , I am not able to read the json files in logstash since it has nested json field inside the message.I need to know what is the best way to read file in logstash

{
"level": "info",
"message": {
    "req": {
        "headers": {
            "host": "localhost:8080",
            "connection": "keep-alive",
            "x-forwarded-for": "192.168.1.1, 1.1.1.1",
            "x-forwarded-proto": "http"
        },
        "url": "/products?userId=493d0aec-a9a7-42a3",
        "method": "GET",
        "originalUrl": "/products?userId=493d0aec-a9a7-42a3",
        "params": {
            "0": "/products"
        },
        "query": {
            "userId": "493d0aec-a9a7-42a3"
        },
        "body": ""
    },
    "res": {
        "headers": {
            "traceid": "ac586e4e924048",
            "x-correlation-id": "57d7920d-b623-48f8",
            "content-type": "application/json;charset=UTF-8",
            "content-length": "2",
            "date": "Fri, 08 Mar 2019 09:55:45 GMT",
            "connection": "close"
        },
        "statusCode": 200,
        "body": "[]"
    },
    "gateway": "internal"
},
"correlationId": "57d7920d-b623-48f8",
"timestamp": "2019-03-08T09:55:45.833Z"

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