<?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 How do I perform field extraction and index the data contained in the one detail field which is json within json? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/609884#M212078</link>
    <description>&lt;P&gt;I have a modular input to write to Splunk using&lt;/P&gt;
&lt;P&gt;event = Event()&lt;/P&gt;
&lt;P&gt;event.data = json.dumps(data)&lt;/P&gt;
&lt;P&gt;ew.write_event(event)&lt;/P&gt;
&lt;P&gt;This all works fine except that in some event.data records there is a detail field that also contains data in json format which is written to Splunk as a string.&lt;/P&gt;
&lt;P&gt;How do I perform field extraction and index the data contained in the one detail field which is json within json?&lt;/P&gt;</description>
    <pubDate>Thu, 18 Aug 2022 04:50:21 GMT</pubDate>
    <dc:creator>jet</dc:creator>
    <dc:date>2022-08-18T04:50:21Z</dc:date>
    <item>
      <title>How do I perform field extraction and index the data contained in the one detail field which is json within json?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/609884#M212078</link>
      <description>&lt;P&gt;I have a modular input to write to Splunk using&lt;/P&gt;
&lt;P&gt;event = Event()&lt;/P&gt;
&lt;P&gt;event.data = json.dumps(data)&lt;/P&gt;
&lt;P&gt;ew.write_event(event)&lt;/P&gt;
&lt;P&gt;This all works fine except that in some event.data records there is a detail field that also contains data in json format which is written to Splunk as a string.&lt;/P&gt;
&lt;P&gt;How do I perform field extraction and index the data contained in the one detail field which is json within json?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 04:50:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/609884#M212078</guid>
      <dc:creator>jet</dc:creator>
      <dc:date>2022-08-18T04:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Json within Json in a modular input...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/609903#M212085</link>
      <description>&lt;P&gt;As I often remind people, it is much easier for others to help if they can see sample data.&lt;/P&gt;&lt;P&gt;The answer to your question really depends on how the JSON string is escaped. &amp;nbsp;In the simplest situation, &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Spath" target="_blank" rel="noopener"&gt;spath&lt;/A&gt;&amp;nbsp;is sufficient. &amp;nbsp;In the following example, field c is already conformant.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath input=c&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;_raw&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;b&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;c&lt;/TD&gt;&lt;TD&gt;i1&lt;/TD&gt;&lt;TD&gt;i2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;{"a":1,"b":2,"c":"{\"i1\":4,\"i2\":5}"}&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;{"i1":4,"i2":5}&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 18 Aug 2022 04:16:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/609903#M212085</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-08-18T04:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Json within Json in a modular input...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/609910#M212088</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;In the attached simple example, the detail field contains json which ideally I would like indexed....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-08-17 at 10.15.18 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21082i0F9E21AC30693B2B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-08-17 at 10.15.18 PM.png" alt="Screen Shot 2022-08-17 at 10.15.18 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 05:32:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/609910#M212088</guid>
      <dc:creator>jet</dc:creator>
      <dc:date>2022-08-18T05:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Json within Json in a modular input...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/609912#M212089</link>
      <description>&lt;P&gt;All you need is to replace &lt;FONT face="andale mono,times"&gt;input=c&lt;/FONT&gt; with &lt;FONT face="andale mono,times"&gt;input=detail&lt;/FONT&gt;&amp;nbsp;in my sample code, i.e.,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath input=detail&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 18 Aug 2022 05:49:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/609912#M212089</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-08-18T05:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Json within Json in a modular input...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/610039#M212129</link>
      <description>&lt;LI-SPOILER&gt;Awesome! Is there anyway to set that as a default from a modular input?&lt;BR /&gt;&lt;BR /&gt;&lt;/LI-SPOILER&gt;</description>
      <pubDate>Thu, 18 Aug 2022 20:38:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/610039#M212129</guid>
      <dc:creator>jet</dc:creator>
      <dc:date>2022-08-18T20:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Json within Json in a modular input...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/610044#M212131</link>
      <description>&lt;P&gt;By modular input you mean a sourcetype and such? &amp;nbsp;No. &amp;nbsp;(Maybe you can submit as an idea at ideas.splunk.com. &amp;nbsp;There was another very recent question of a similar nature.)&lt;/P&gt;</description>
      <pubDate>Thu, 18 Aug 2022 21:44:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-perform-field-extraction-and-index-the-data-contained/m-p/610044#M212131</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-08-18T21:44:25Z</dc:date>
    </item>
  </channel>
</rss>

