<?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 breakdown JSON data with escape characters from events in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-breakdown-JSON-data-with-escape-characters-from-events/m-p/482184#M82624</link>
    <description>&lt;P&gt;Hey all,&lt;BR /&gt;
I have recently structured and extracted some data from a REST API and stored the data in an index. Now the problem is, I have one field in this data which was extracted as its original JSON structure from the API and now it looks like this in one of my events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;threshold_values="{\"thresholdLevels\": [{\"severityValue\": 4, \"severityLabel\": \"medium\", \"severityColor\": \"#FCB64E\", \"severityColorLight\": \"#FEE6C1\", \"thresholdValue\": 0, \"dynamicParam\": 0}, {\"severityValue\": 3, \"severityLabel\": \"low\", \"severityColor\": \"#FFE98C\", \"severityColorLight\": \"#FFF4C5\", \"thresholdValue\": 5, \"dynamicParam\": 0}, {\"severityValue\": 2, \"severityLabel\": \"normal\", \"severityColor\": \"#99D18B\", \"severityColorLight\": \"#DCEFD7\", \"thresholdValue\": 19, \"dynamicParam\": 0}], \"baseSeverityColorLight\": \"#E3F0F6\", \"baseSeverityColor\": \"#AED3E5\", \"gaugeMin\": 0, \"renderBoundaryMin\": 0, \"isMaxStatic\": false, \"baseSeverityValue\": 1, \"metricField\": \"count\", \"isMinStatic\": true, \"gaugeMax\": 20.9, \"baseSeverityLabel\": \"info\", \"renderBoundaryMax\": 100}"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now my objective is to break down this field into multiple fields of SeverityLabel and SeverityValue and extract their corresponding values. This should be done for all of my events which follow a similar structure.&lt;/P&gt;

&lt;P&gt;Please help I am new to Splunk&lt;BR /&gt;
Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2019 01:12:06 GMT</pubDate>
    <dc:creator>pkol</dc:creator>
    <dc:date>2019-09-16T01:12:06Z</dc:date>
    <item>
      <title>How to breakdown JSON data with escape characters from events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-breakdown-JSON-data-with-escape-characters-from-events/m-p/482184#M82624</link>
      <description>&lt;P&gt;Hey all,&lt;BR /&gt;
I have recently structured and extracted some data from a REST API and stored the data in an index. Now the problem is, I have one field in this data which was extracted as its original JSON structure from the API and now it looks like this in one of my events:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;threshold_values="{\"thresholdLevels\": [{\"severityValue\": 4, \"severityLabel\": \"medium\", \"severityColor\": \"#FCB64E\", \"severityColorLight\": \"#FEE6C1\", \"thresholdValue\": 0, \"dynamicParam\": 0}, {\"severityValue\": 3, \"severityLabel\": \"low\", \"severityColor\": \"#FFE98C\", \"severityColorLight\": \"#FFF4C5\", \"thresholdValue\": 5, \"dynamicParam\": 0}, {\"severityValue\": 2, \"severityLabel\": \"normal\", \"severityColor\": \"#99D18B\", \"severityColorLight\": \"#DCEFD7\", \"thresholdValue\": 19, \"dynamicParam\": 0}], \"baseSeverityColorLight\": \"#E3F0F6\", \"baseSeverityColor\": \"#AED3E5\", \"gaugeMin\": 0, \"renderBoundaryMin\": 0, \"isMaxStatic\": false, \"baseSeverityValue\": 1, \"metricField\": \"count\", \"isMinStatic\": true, \"gaugeMax\": 20.9, \"baseSeverityLabel\": \"info\", \"renderBoundaryMax\": 100}"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now my objective is to break down this field into multiple fields of SeverityLabel and SeverityValue and extract their corresponding values. This should be done for all of my events which follow a similar structure.&lt;/P&gt;

&lt;P&gt;Please help I am new to Splunk&lt;BR /&gt;
Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 01:12:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-breakdown-JSON-data-with-escape-characters-from-events/m-p/482184#M82624</guid>
      <dc:creator>pkol</dc:creator>
      <dc:date>2019-09-16T01:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to breakdown JSON data with escape characters from events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-breakdown-JSON-data-with-escape-characters-from-events/m-p/482185#M82625</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|rex field=_raw "severityValue\\\+\"+\:(?&amp;lt;sev_val&amp;gt;.*?)\,+\s+\\\+\"+severityLabel\\\+\"+\:+\s+\\\+\"+(?&amp;lt;sev_label&amp;gt;.*?)\\\+" max_match=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Sep 2019 11:09:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-breakdown-JSON-data-with-escape-characters-from-events/m-p/482185#M82625</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-09-16T11:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to breakdown JSON data with escape characters from events</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-breakdown-JSON-data-with-escape-characters-from-events/m-p/482186#M82626</link>
      <description>&lt;P&gt;hi @pkol - Did this resolve your issue?&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2019 07:26:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-breakdown-JSON-data-with-escape-characters-from-events/m-p/482186#M82626</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-09-29T07:26:12Z</dc:date>
    </item>
  </channel>
</rss>

