<?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 fields from json and nested json in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-json-and-nested-json/m-p/684345#M114205</link>
    <description>&lt;P&gt;I used spath for extraction&lt;/P&gt;</description>
    <pubDate>Tue, 16 Apr 2024 10:04:47 GMT</pubDate>
    <dc:creator>gemrose</dc:creator>
    <dc:date>2024-04-16T10:04:47Z</dc:date>
    <item>
      <title>Extract fields from json and nested json</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-json-and-nested-json/m-p/682973#M114021</link>
      <description>&lt;P&gt;I am using regex to extract the field from the below json data. I want to extract the fields in key-value pair specially log.message from the json data. Example if I need "action" field from log.message&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;clusterName: cluster-9gokdwng4f
internal_tag: internal_security
log: { [-]
message: {"action":"EXECUTE","class":"System-Queue","eventC":"Data access event","eventT":"Obj-Open with role","timeStamp":"Wed 2024 Apr 03, 04:58:28:932"}
stack:
thread_name: Batch-1
timestamp: 2024-04-03T04:58:28.932Z
version: 1
}
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Apr 2024 10:57:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-json-and-nested-json/m-p/682973#M114021</guid>
      <dc:creator>gemrose</dc:creator>
      <dc:date>2024-04-03T10:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from json and nested json</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-json-and-nested-json/m-p/682987#M114023</link>
      <description>&lt;P&gt;1. Don't use simple regexes to manipulate structured data. Earlier or later you'll regret it (you'll get yourself in a situation with some (un)escaped delimiter or similar thing).&lt;/P&gt;&lt;P&gt;2. This is not a well-formed json.&lt;/P&gt;&lt;P&gt;3. Splunk doesn't handle well json (or any other structured data like XML) with additional content "surrounding" it in terms of automatic extraction so your best bet would be to extract the json part (with caution - see point 1) and run spath command on that field. Unfortunately it cannot be made as automatic extraction. It needs to be invoked manually in your search pipeline.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 08:28:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-json-and-nested-json/m-p/682987#M114023</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-04-03T08:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from json and nested json</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-json-and-nested-json/m-p/684345#M114205</link>
      <description>&lt;P&gt;I used spath for extraction&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2024 10:04:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Extract-fields-from-json-and-nested-json/m-p/684345#M114205</guid>
      <dc:creator>gemrose</dc:creator>
      <dc:date>2024-04-16T10:04:47Z</dc:date>
    </item>
  </channel>
</rss>

