<?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: Trying to parse my Json into a table in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-parse-my-Json-into-a-table/m-p/271920#M52248</link>
    <description>&lt;P&gt;woohoo!  Excellent. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Feb 2017 00:44:03 GMT</pubDate>
    <dc:creator>rsennett_splunk</dc:creator>
    <dc:date>2017-02-01T00:44:03Z</dc:date>
    <item>
      <title>Trying to parse my Json into a table</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-parse-my-Json-into-a-table/m-p/271917#M52245</link>
      <description>&lt;P&gt;this is the format:&lt;/P&gt;

&lt;P&gt;{&lt;BR /&gt;
        "epoch": "1485892851.94944",&lt;BR /&gt;
        "id": "3952418",&lt;BR /&gt;
        "name": "WMI Performance Adapter",&lt;BR /&gt;
        "new_attrs": "{\"DisplayName\":\"WMI Performance Adapter\",\"ServiceName\":\"wmiApSrv\",\"enabled\":\"Manual\",\"state\":\"Running\",\"User\":\"localSystem\"}",&lt;BR /&gt;
        "new_scan_id": "513186",&lt;BR /&gt;
        "node_environment_id": "2",&lt;BR /&gt;
        "node_id": "153",&lt;BR /&gt;
        "node_name": "servername",&lt;BR /&gt;
        "node_primary_node_group_id": "68",&lt;BR /&gt;
        "old_attrs": "{\"DisplayName\":\"WMI Performance Adapter\",\"ServiceName\":\"wmiApSrv\",\"enabled\":\"Manual\",\"state\":\"Stopped\",\"User\":\"localSystem\"}",&lt;BR /&gt;
        "old_scan_id": "513150",&lt;BR /&gt;
        "path": "{services,windows}",&lt;BR /&gt;
        "status": "modified",&lt;BR /&gt;
        "type": "services",&lt;BR /&gt;
        "updated_at": "2017-01-31 20:00:51.949442"&lt;BR /&gt;
    }&lt;/P&gt;

&lt;P&gt;trying to use the spath &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:41:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-parse-my-Json-into-a-table/m-p/271917#M52245</guid>
      <dc:creator>dperry</dc:creator>
      <dc:date>2020-09-29T12:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to parse my Json into a table</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-parse-my-Json-into-a-table/m-p/271918#M52246</link>
      <description>&lt;P&gt;I believe this is what you are looking for:&lt;BR /&gt;
I selected one field from new_attr and old_attr because it is the only one that differs. Otherwise you can't see what's happening.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=blah sourcetype=blah 
| spath input=new_attrs 
|rename state AS newState
|spath input=old_attrs
|rename state AS oldState
|table newState oldState
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But you would simply rename the ones you wanted. ie rename state as newState, DisplayName AS newDisplay, ServiceName AS Fred&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:38:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-parse-my-Json-into-a-table/m-p/271918#M52246</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2020-09-29T12:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to parse my Json into a table</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-parse-my-Json-into-a-table/m-p/271919#M52247</link>
      <description>&lt;P&gt;Thanks Producer! This is along the lines of what I was visioning.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 00:28:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-parse-my-Json-into-a-table/m-p/271919#M52247</guid>
      <dc:creator>dperry</dc:creator>
      <dc:date>2017-02-01T00:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to parse my Json into a table</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-parse-my-Json-into-a-table/m-p/271920#M52248</link>
      <description>&lt;P&gt;woohoo!  Excellent. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2017 00:44:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-parse-my-Json-into-a-table/m-p/271920#M52248</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2017-02-01T00:44:03Z</dc:date>
    </item>
  </channel>
</rss>

