<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Extract  part of JSON object with its child or nested attributes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-part-of-JSON-object-with-its-child-or-nested-attributes/m-p/531208#M150065</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal | head 1 | fields _raw | eval _raw="{\"name\":\"notificationService\",\"requestId\":\"ee76e5cf-90cc-521f-bc96-bdf6f39f5bc8\",\"parsedEvent\":{\"event\":{\"eventName\":\"Notification\",\"timestamp\":\"2020-11-26T18:55:14.000+11:00\",\"delivery\":\"NotifierSystem\",\"notificationEventType\":\"EMAIL\"},\"metadata\":{\"correlationId\":\"1603246877854\"}},\"msg\":\"Starting to process event\",\"time\":\"2020-11-26T08:02:39.123Z\"}"
| spath parsedEvent output=parsedEvent
| spath input=parsedEvent event output=nest_event
| spath input=parsedEvent metadata output=nest_metadata&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Splunk deploys everything, so you'll have to do it yourself to put it together&lt;/P&gt;</description>
    <pubDate>Fri, 27 Nov 2020 23:55:15 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-11-27T23:55:15Z</dc:date>
    <item>
      <title>Extract  part of JSON object with its child or nested attributes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-part-of-JSON-object-with-its-child-or-nested-attributes/m-p/531017#M150011</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;Our data ingested into our Index are in proper JSON format &amp;amp; Splunk is converting into JSON object automatically&amp;nbsp; , but I'm unable to extract/access any of&amp;nbsp; the child object along with its nested attributes.&lt;/P&gt;&lt;P&gt;Example :&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"name": "notificationService",&lt;BR /&gt;"requestId": "ee76e5cf-90cc-521f-bc96-bdf6f39f5bc8",&lt;BR /&gt;"parsedEvent": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "event": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "eventName": "Notification",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "timestamp": "2020-11-26T18:55:14.000+11:00",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "delivery": "NotifierSystem",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "notificationEventType": "EMAIL"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;BR /&gt;&amp;nbsp;"metadata": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "correlationId": "1603246877854"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;BR /&gt;},&lt;BR /&gt;"msg": "Starting to process event",&lt;BR /&gt;"time": "2020-11-26T08:02:39.123Z"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Search query&lt;/STRONG&gt; :&amp;nbsp; &amp;nbsp;&lt;EM&gt; .... | table&amp;nbsp; requestId, name, parsedEvent.metadata.correlationId, parsedEvent.event&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is getting me :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;ee76e5cf-90cc-521f-bc96-bdf6f39f5bc8,notificationService, 1603246877854,&amp;lt;blank&amp;gt;&lt;/P&gt;&lt;P&gt;If you see, I'm not able to get the&amp;nbsp;&amp;nbsp;&lt;EM&gt;"parsedEvent.event"&lt;/EM&gt; object along with its child attributes, but i'm able to access "&lt;EM&gt;parsedEvent.metadata.correlationId"&amp;nbsp; &amp;nbsp;&lt;/EM&gt;successfully&amp;nbsp;which doesn't have any child.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Any help would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Nov 2020 14:31:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-part-of-JSON-object-with-its-child-or-nested-attributes/m-p/531017#M150011</guid>
      <dc:creator>imprabha1989</dc:creator>
      <dc:date>2020-11-26T14:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Extract  part of JSON object with its child or nested attributes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-part-of-JSON-object-with-its-child-or-nested-attributes/m-p/531021#M150015</link>
      <description>&lt;P&gt;Does this work for getting the eventName? That is, has the full extraction worked down to the lowest level?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; table  requestId, name, parsedEvent.metadata.correlationId, parsedEvent.event.eventName&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 26 Nov 2020 15:11:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-part-of-JSON-object-with-its-child-or-nested-attributes/m-p/531021#M150015</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-11-26T15:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extract  part of JSON object with its child or nested attributes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-part-of-JSON-object-with-its-child-or-nested-attributes/m-p/531107#M150035</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, the full extraction to the lowest level is/are working. But it I want the whole event object with its nested attributes.&amp;nbsp; We can use rex operation on _raw data but looking for something that can help us easily access it as we normally do with in JSON objects or something that converts pointed JSON object&amp;nbsp; to a string.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 08:12:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-part-of-JSON-object-with-its-child-or-nested-attributes/m-p/531107#M150035</guid>
      <dc:creator>imprabha1989</dc:creator>
      <dc:date>2020-11-27T08:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract  part of JSON object with its child or nested attributes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-part-of-JSON-object-with-its-child-or-nested-attributes/m-p/531109#M150037</link>
      <description>&lt;P&gt;Reparse _raw for the object you want&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath path=parsedEvent.event&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 27 Nov 2020 08:20:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-part-of-JSON-object-with-its-child-or-nested-attributes/m-p/531109#M150037</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-11-27T08:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract  part of JSON object with its child or nested attributes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-part-of-JSON-object-with-its-child-or-nested-attributes/m-p/531208#M150065</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=_internal | head 1 | fields _raw | eval _raw="{\"name\":\"notificationService\",\"requestId\":\"ee76e5cf-90cc-521f-bc96-bdf6f39f5bc8\",\"parsedEvent\":{\"event\":{\"eventName\":\"Notification\",\"timestamp\":\"2020-11-26T18:55:14.000+11:00\",\"delivery\":\"NotifierSystem\",\"notificationEventType\":\"EMAIL\"},\"metadata\":{\"correlationId\":\"1603246877854\"}},\"msg\":\"Starting to process event\",\"time\":\"2020-11-26T08:02:39.123Z\"}"
| spath parsedEvent output=parsedEvent
| spath input=parsedEvent event output=nest_event
| spath input=parsedEvent metadata output=nest_metadata&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Splunk deploys everything, so you'll have to do it yourself to put it together&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2020 23:55:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-part-of-JSON-object-with-its-child-or-nested-attributes/m-p/531208#M150065</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-11-27T23:55:15Z</dc:date>
    </item>
  </channel>
</rss>

