<?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: Split JSON object attributes out as key-value in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Split-JSON-object-attributes-out-as-key-value/m-p/65649#M13185</link>
    <description>&lt;P&gt;How's this look?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype=your_json | head 1 &lt;BR /&gt;
| spath output=gbp path=rates{}.GBP &lt;BR /&gt;
| spath output=zar path=rates{}.ZAR&lt;BR /&gt;
| table gbp, zar&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2013 22:47:48 GMT</pubDate>
    <dc:creator>fervin</dc:creator>
    <dc:date>2013-10-23T22:47:48Z</dc:date>
    <item>
      <title>Split JSON object attributes out as key-value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-JSON-object-attributes-out-as-key-value/m-p/65648#M13184</link>
      <description>&lt;P&gt;I have a JSON object of currency conversion rates as the event, which looks like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
  "base": "USD",
  "rates": {
    "GBP": 1.6,
    "ZAR": 10.2
  }
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to pull the rates out as a table to look like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Currency      Rate
========      ====
GBP            1.6
ZAR           10.2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can't figure out how to pull out the attribute as a column&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2013 17:01:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-JSON-object-attributes-out-as-key-value/m-p/65648#M13184</guid>
      <dc:creator>johnoxley_liqui</dc:creator>
      <dc:date>2013-09-17T17:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Split JSON object attributes out as key-value</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Split-JSON-object-attributes-out-as-key-value/m-p/65649#M13185</link>
      <description>&lt;P&gt;How's this look?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype=your_json | head 1 &lt;BR /&gt;
| spath output=gbp path=rates{}.GBP &lt;BR /&gt;
| spath output=zar path=rates{}.ZAR&lt;BR /&gt;
| table gbp, zar&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2013 22:47:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Split-JSON-object-attributes-out-as-key-value/m-p/65649#M13185</guid>
      <dc:creator>fervin</dc:creator>
      <dc:date>2013-10-23T22:47:48Z</dc:date>
    </item>
  </channel>
</rss>

