<?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 extract fields from a JSON file from Google Analytics API? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-a-JSON-file-from-Google-Analytics-API/m-p/288602#M87383</link>
    <description>&lt;P&gt;Hello @satkumvnr,&lt;/P&gt;

&lt;P&gt;according to JSONLint, the json is not valid.&lt;/P&gt;

&lt;P&gt;I understand you had to modify it in order to remove sensitive information, but the result is not valid and I can not work with it.&lt;/P&gt;

&lt;P&gt;Can you please check with jsonLint the result of the pruned json and post it back as an answer to this comment?&lt;/P&gt;</description>
    <pubDate>Tue, 10 Jul 2018 14:22:56 GMT</pubDate>
    <dc:creator>poete</dc:creator>
    <dc:date>2018-07-10T14:22:56Z</dc:date>
    <item>
      <title>How to extract fields from a JSON file from Google Analytics API?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-a-JSON-file-from-Google-Analytics-API/m-p/288601#M87382</link>
      <description>&lt;P&gt;Hi dear Splunkers&lt;/P&gt;

&lt;P&gt;I have the following JSON given by a REST calling at Google Analytics:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{"kind":"analytics#realtimeData","id":"https://www.googleapis.com/analytics/v3/data/realtime?ids=ga:XXXXXXX&amp;amp;dimensions=rt:eventCategory,rt:eventAction,rt:eventLabel&amp;amp;metrics=rt:totalEvents&amp;amp;filters=rt:eventCategory%3D%3Ddata","query":{"ids":"ga:XXXXXXX","dimensions":"rt:eventCategory,rt:eventAction,rt:eventLabel","metrics":["rt:totalEvents"],"filters":"rt:eventCategory==Results”,”max-results":1000},"totalResults":7,"selfLink":"https://www.googleapis.com/analytics/v3/data/realtime?ids=ga:XXXXXXX&amp;amp;dimensions=rt:eventCategory,rt:eventAction,rt:eventLabel&amp;amp;metrics=rt:totalEvents&amp;amp;filters=rt:eventCategory%3D%3Ddata","profileInfo":{"profileId":"XXXXXXX","accountId":"XXXXXXX","webPropertyId":"XXXXXXX","internalWebPropertyId":"XXXXXXX","profileName":"All Web Site Data","tableId":"realtime:XXXXXXX"},"columnHeaders":[{"name":"rt:eventCategory","columnType":"DIMENSION","dataType":"STRING"},{"name":"rt:eventAction","columnType":"DIMENSION","dataType":"STRING"},{"name":"rt:eventLabel","columnType":"DIMENSION","dataType":"STRING"},{"name":"rt:totalEvents","columnType":"METRIC","dataType":"INTEGER"}],"totalsForAllResults":{"rt:totalEvents":"377"},"rows”:[[“Success”,”search","0JIwnotL","67”],[“Failure”,”search","AgxsqvYs","8"],["Failure","search","DQhOXfQs","41"],["Failure","search","I6HTlk5z","68"],["Results","search","TL7dI0UN","60"],["Success","search","XcC3EU45","69"],["Success","search","oBTyH99G","64"]]}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'm having a hard time trying to use spath so I can break the data I need as follows:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Results    Process   Info               Count
Failure     search     0JIwnotL       67
Success  search      XcC3EU45    69
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can you guys help me?&lt;BR /&gt;
How can I use spath (or any other tool) to do this to break as a separate event?&lt;BR /&gt;
Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2018 05:03:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-a-JSON-file-from-Google-Analytics-API/m-p/288601#M87382</guid>
      <dc:creator>satkumvnr</dc:creator>
      <dc:date>2018-02-16T05:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract fields from a JSON file from Google Analytics API?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-a-JSON-file-from-Google-Analytics-API/m-p/288602#M87383</link>
      <description>&lt;P&gt;Hello @satkumvnr,&lt;/P&gt;

&lt;P&gt;according to JSONLint, the json is not valid.&lt;/P&gt;

&lt;P&gt;I understand you had to modify it in order to remove sensitive information, but the result is not valid and I can not work with it.&lt;/P&gt;

&lt;P&gt;Can you please check with jsonLint the result of the pruned json and post it back as an answer to this comment?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2018 14:22:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-a-JSON-file-from-Google-Analytics-API/m-p/288602#M87383</guid>
      <dc:creator>poete</dc:creator>
      <dc:date>2018-07-10T14:22:56Z</dc:date>
    </item>
  </channel>
</rss>

