<?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 json fields from json inside single quotes? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-json-fields-from-json-inside-single-quotes/m-p/577964#M201397</link>
    <description>&lt;P&gt;Hey I am having difficulties trying to extract fields from my splint logs. They are in the format of&lt;/P&gt;&lt;P&gt;’{“field”: “value1”, “field2”: “value2”}’ &amp;nbsp;I’ve tried using spath but it doesn’t seem to work. I think the issue is that the json object is enclosed in single quotes so splunk doesn’t recognise it as json.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Dec 2021 04:55:13 GMT</pubDate>
    <dc:creator>Alanshiau717</dc:creator>
    <dc:date>2021-12-10T04:55:13Z</dc:date>
    <item>
      <title>How to extract json fields from json inside single quotes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-json-fields-from-json-inside-single-quotes/m-p/577964#M201397</link>
      <description>&lt;P&gt;Hey I am having difficulties trying to extract fields from my splint logs. They are in the format of&lt;/P&gt;&lt;P&gt;’{“field”: “value1”, “field2”: “value2”}’ &amp;nbsp;I’ve tried using spath but it doesn’t seem to work. I think the issue is that the json object is enclosed in single quotes so splunk doesn’t recognise it as json.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 04:55:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-json-fields-from-json-inside-single-quotes/m-p/577964#M201397</guid>
      <dc:creator>Alanshiau717</dc:creator>
      <dc:date>2021-12-10T04:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract json fields from json inside single quotes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-json-fields-from-json-inside-single-quotes/m-p/577965#M201398</link>
      <description>&lt;P&gt;One solution is to rex the json out. &amp;nbsp;Assuming that the sample data you give is _raw:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "'(?&amp;lt;jfield&amp;gt;[^']+)"
| spath input=jfield&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Dec 2021 05:14:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-json-fields-from-json-inside-single-quotes/m-p/577965#M201398</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2021-12-10T05:14:34Z</dc:date>
    </item>
  </channel>
</rss>

