<?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: How to parse json field? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-json-field/m-p/312325#M58546</link>
    <description>&lt;P&gt;try adding something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=data "'latitude' : '(?&amp;lt;latitude&amp;gt;.*)', 'longitude' : '(?&amp;lt;longitude&amp;gt;.*)'"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 19 Jan 2018 13:01:27 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2018-01-19T13:01:27Z</dc:date>
    <item>
      <title>How to parse json field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-json-field/m-p/312324#M58545</link>
      <description>&lt;P&gt;Hello friends, first of all sorry because my english isn't fluent...&lt;/P&gt;

&lt;P&gt;I've been searching similar questions, but anyone solved my problem.&lt;/P&gt;

&lt;P&gt;In my search code, I have a JSON geolocalization field as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{'latitude' : '-19.9206813889499', 'longitude' : ' '}   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I just want to split it up in two collumns.&lt;/P&gt;

&lt;P&gt;How can I do this?&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 12:41:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-json-field/m-p/312324#M58545</guid>
      <dc:creator>rodrwan</dc:creator>
      <dc:date>2018-01-19T12:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse json field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-json-field/m-p/312325#M58546</link>
      <description>&lt;P&gt;try adding something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=data "'latitude' : '(?&amp;lt;latitude&amp;gt;.*)', 'longitude' : '(?&amp;lt;longitude&amp;gt;.*)'"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jan 2018 13:01:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-json-field/m-p/312325#M58546</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2018-01-19T13:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse json field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-json-field/m-p/312326#M58547</link>
      <description>&lt;P&gt;hey&lt;/P&gt;

&lt;P&gt;Try this run anywhere search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="{'latitude' : '-19.9206813889499', 'longitude' : ' '}" 
| rex field=_raw "{'latitude'\s:\s'(?&amp;lt;latitude&amp;gt;[^\']*)',\s'longitude'\s:\s'(?&amp;lt;longitude&amp;gt;[^\']+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In your environment you should write,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your_base_search&amp;gt;
| rex field=_raw "{'latitude'\s:\s'(?&amp;lt;latitude&amp;gt;[^\']*)',\s'longitude'\s:\s'(?&amp;lt;longitude&amp;gt;[^\']+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 13:16:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-json-field/m-p/312326#M58547</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-19T13:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse json field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-json-field/m-p/312327#M58548</link>
      <description>&lt;P&gt;Thank you all, the solution posted by mayurr98 have solved my problem!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jan 2018 14:44:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-json-field/m-p/312327#M58548</guid>
      <dc:creator>rodrwan</dc:creator>
      <dc:date>2018-01-19T14:44:48Z</dc:date>
    </item>
  </channel>
</rss>

