<?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 to extract fields from a JSON? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-a-JSON/m-p/307521#M57909</link>
    <description>&lt;P&gt;Hello everybody,&lt;/P&gt;

&lt;P&gt;I have the next event registered in my splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Fri Mar 31 11:05:18 COT 2017 name=amqp_msg_received event_id=null msg_queue=seguros.traza.documentoValidado msg_exchange=seguros.cuadre.documentoValidado msg_body={"valid": true}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And what i need is to extract the value of "valid", the source_type of the event is &lt;EM&gt;json_no_timestamp&lt;/EM&gt;, how could i do this?&lt;/P&gt;

&lt;P&gt;I have tried using spath without luck, any advice?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 13:30:10 GMT</pubDate>
    <dc:creator>ivykp</dc:creator>
    <dc:date>2020-09-29T13:30:10Z</dc:date>
    <item>
      <title>How to extract fields from a JSON?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-a-JSON/m-p/307521#M57909</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;

&lt;P&gt;I have the next event registered in my splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Fri Mar 31 11:05:18 COT 2017 name=amqp_msg_received event_id=null msg_queue=seguros.traza.documentoValidado msg_exchange=seguros.cuadre.documentoValidado msg_body={"valid": true}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And what i need is to extract the value of "valid", the source_type of the event is &lt;EM&gt;json_no_timestamp&lt;/EM&gt;, how could i do this?&lt;/P&gt;

&lt;P&gt;I have tried using spath without luck, any advice?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:30:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-a-JSON/m-p/307521#M57909</guid>
      <dc:creator>ivykp</dc:creator>
      <dc:date>2020-09-29T13:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from a JSON?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-a-JSON/m-p/307522#M57910</link>
      <description>&lt;P&gt;Hi there mate, did you try something like this ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | spath input=msg_body
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope it helps.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 17:07:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-a-JSON/m-p/307522#M57910</guid>
      <dc:creator>alemarzu</dc:creator>
      <dc:date>2017-03-31T17:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from a JSON?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-a-JSON/m-p/307523#M57911</link>
      <description>&lt;P&gt;Splunk must have extract field &lt;CODE&gt;msg_body&lt;/CODE&gt; with some values as it's in classic kv format. What value do you get as part of msg_body field? Will the msg_body always going to contain "valid" or it may be something else?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:30:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-extract-fields-from-a-JSON/m-p/307523#M57911</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T13:30:13Z</dc:date>
    </item>
  </channel>
</rss>

