title: How to map nested JSON in Log-stash HTTP Output
body: <p>I am using Logstash to output JSON message to an API. I am using "mapping" attribute to map my message. See, following piece of my shipper configurations. </p>
  
  <pre><code>output {
      stdout { }
       http {
          url =&gt; "http://localhost:8087/messages"
          http_method =&gt; "post"
          format =&gt; "json"
          mapping =&gt; ["MessageId","654656","TimeStamp","2001-12-31T12:00:00","CorrelationId","986565","MessageType","%{log_MessageType}" ,"MessageTitle","%{log_MessageTitle}","Message","%{log_Message}"]
      }
  }
  </code></pre>
  
  <p>This configuration is working fine and is producing following output:</p>
  
  <pre><code>{
    "MessageId": "654656",
    "TimeStamp": "2001-12-31T12:00:00",
    "CorrelationId": "986565",
    "MessageType": "INFO",
    "MessageTitle": "TestTittle",
    "Message": "Sample Message"
  }
  </code></pre>
  
  <p><strong>Input Log Entry:</strong></p>
  
  <pre><code>TID: [0] [ESB] [2016-05-30 23:02:02,602]  INFO {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService} -  Configured Registry in 572ms {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService}
  </code></pre>
  
  <p><strong>Grok Pattern :</strong></p>
  
  <pre><code>TID:%{SPACE}\[%{INT:log_SourceSystemId}\]%{SPACE}\[%{DATA:log_ProcessName}\]%{SPACE}\[%{TIMESTAMP_ISO8601:log_TimeStamp}\]%{SPACE}%{LOGLEVEL:log_MessageType}%{SPACE}{%{JAVACLASS:log_MessageTitle}}%{SPACE}-%{SPACE}%{GREEDYDATA:log_Message}
  </code></pre>
  
  <p><strong>Problem Statement:</strong></p>
  
  <p>I want following output through mapping of HTTP. I wanted a nested JSON type inside my message, how should I add that in the mapping tag. </p>
  
  <p><strong>Expected Output:</strong></p>
  
  <pre><code>{
    "MessageId": "654656",
    "TimeStamp": "2001-12-31T12:00:00",
    "CorrelationId": "986565",
    "MessageType": "INFO",
    "MessageTitle": "TestTittle",
    "Message": "Sample Message",
    "MessageDetail": {
      "FieldA": "65656",
      "FieldB": "192.168.1.1",
      "FieldC": "sample value"
  
    }
  }
  </code></pre>
  
  <p>I have tried few options but I am receiving errors. </p>