<?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 have my JSON output data in separate rows and not a single one? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-have-my-JSON-output-data-in-separate-rows-and-not-a/m-p/433643#M75788</link>
    <description>&lt;P&gt;Hey @nadhiyaa,&lt;/P&gt;

&lt;P&gt;Did @niketnilay help solve your problem? If so, would you approve his answer so that other users know it's legit. Also, could you toss him an upvote? MMM... upvotes.&lt;/P&gt;</description>
    <pubDate>Wed, 29 Aug 2018 21:59:25 GMT</pubDate>
    <dc:creator>mstjohn_splunk</dc:creator>
    <dc:date>2018-08-29T21:59:25Z</dc:date>
    <item>
      <title>How to have my JSON output data in separate rows and not a single one?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-have-my-JSON-output-data-in-separate-rows-and-not-a/m-p/433639#M75784</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5670iA98F5B74A5A7DB1F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;This is the output of my JSON data. I would want to see it in separate rows and not in a single row.&lt;BR /&gt;
When I do mvexpand for each time it's taking all the count1 values.&lt;/P&gt;

&lt;P&gt;My output should be separate rows with time and count1 value.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 07:03:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-have-my-JSON-output-data-in-separate-rows-and-not-a/m-p/433639#M75784</guid>
      <dc:creator>Nadhiyaa</dc:creator>
      <dc:date>2018-08-29T07:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to have my JSON output data in separate rows and not a single one?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-have-my-JSON-output-data-in-separate-rows-and-not-a/m-p/433640#M75785</link>
      <description>&lt;P&gt;@Nadhiyaa as explained in my &lt;A href="https://answers.splunk.com/answers/683687/json-data-parsing.html"&gt;previous answer&lt;/A&gt; fields &lt;CODE&gt;count1&lt;/CODE&gt; and &lt;CODE&gt;time&lt;/CODE&gt; need to be zipped together using &lt;CODE&gt;mvzip()&lt;/CODE&gt; evaluation function. Try the following search based on your data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;yourCurrentSearch&amp;gt;
 | table count1 time
 | eval data=mvzip(count1, time) 
 | mvexpand data 
 | makemv data delim="," 
 | eval count1=mvindex(data,0),time=mvindex(data,1) 
 | fields - data
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Aug 2018 07:53:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-have-my-JSON-output-data-in-separate-rows-and-not-a/m-p/433640#M75785</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-08-29T07:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to have my JSON output data in separate rows and not a single one?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-have-my-JSON-output-data-in-separate-rows-and-not-a/m-p/433641#M75786</link>
      <description>&lt;P&gt;Yes it worked .&lt;BR /&gt;
Now i am trying add a trend in a single value format. &lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 08:01:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-have-my-JSON-output-data-in-separate-rows-and-not-a/m-p/433641#M75786</guid>
      <dc:creator>Nadhiyaa</dc:creator>
      <dc:date>2018-08-29T08:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to have my JSON output data in separate rows and not a single one?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-have-my-JSON-output-data-in-separate-rows-and-not-a/m-p/433642#M75787</link>
      <description>&lt;P&gt;@Nadhiyaa you can call your time field as &lt;CODE&gt;_time&lt;/CODE&gt; which should take care of showing data over time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   &amp;lt;yourCurrentSearch&amp;gt;
  | table count1 time
  | eval data=mvzip(count1, time) 
  | mvexpand data 
  | makemv data delim="," 
  | eval count1=mvindex(data,0),_time=mvindex(data,1) 
  | table _time count1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you want you can also add timechart command with required aggregating function like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | timechart sum(count1) as Total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Aug 2018 08:12:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-have-my-JSON-output-data-in-separate-rows-and-not-a/m-p/433642#M75787</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-08-29T08:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to have my JSON output data in separate rows and not a single one?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-have-my-JSON-output-data-in-separate-rows-and-not-a/m-p/433643#M75788</link>
      <description>&lt;P&gt;Hey @nadhiyaa,&lt;/P&gt;

&lt;P&gt;Did @niketnilay help solve your problem? If so, would you approve his answer so that other users know it's legit. Also, could you toss him an upvote? MMM... upvotes.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2018 21:59:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-have-my-JSON-output-data-in-separate-rows-and-not-a/m-p/433643#M75788</guid>
      <dc:creator>mstjohn_splunk</dc:creator>
      <dc:date>2018-08-29T21:59:25Z</dc:date>
    </item>
  </channel>
</rss>

