<?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: JSON data, unexpected value count in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677053#M80211</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you see what every i am trying its getting two same values&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20240209_093755.jpg" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29320iB49B3D7DD2216C07/image-size/large?v=v2&amp;amp;px=999" role="button" title="20240209_093755.jpg" alt="20240209_093755.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Feb 2024 09:47:20 GMT</pubDate>
    <dc:creator>phanikumarcs</dc:creator>
    <dc:date>2024-02-09T09:47:20Z</dc:date>
    <item>
      <title>JSON data, unexpected value count</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677010#M80208</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;When i want to extract the fields from JSON (below) destination,messages, inflightMessages.&lt;/P&gt;
&lt;P&gt;This the one of the latest event:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{

  "analytics": [

     {

        "destination": "billing.events.prod",

        "messages": 0,

        "inflightMessages": 0

     },

     {

        "destination": "billing.events.dev",

        "messages": 0,

        "inflightMessages": 0

     },

     {

        "destination": "hub.values.prod",

        "messages": 0,

        "inflightMessages": 0

     },

     {

        "destination": "hub.fifo-prod",

        "messages": 0,

        "inflightMessages": 0

     }

   ]

}

&lt;/LI-CODE&gt;
&lt;P&gt;This is the spl i am using:&lt;/P&gt;
&lt;P&gt;index=myindex sourcetype=mysourcetype&lt;/P&gt;
&lt;P&gt;| spath input=_raw&lt;/P&gt;
&lt;P&gt;| table analytics{}.destination, analytics{}.messages, analytics{}.inflightMessages&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where i am getting in the intrested fields&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"analytics{}.destination" for this when i move curser to see values and count associated, for each value showing count 2, when you search for one event.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why this is happening what is the issue? This data generally mulesoftmq.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 21:38:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677010#M80208</guid>
      <dc:creator>phanikumarcs</dc:creator>
      <dc:date>2024-02-08T21:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data, unexpected value count</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677019#M80209</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/254654"&gt;@phanikumarcs&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;The spath command is duplicating the values of this event. Please try the following not using the spath command:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex sourcetype=mysourcetype
| table analytics{}.destination, analytics{}.messages, analytics{}.inflightMessages&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 22:54:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677019#M80209</guid>
      <dc:creator>danielcj</dc:creator>
      <dc:date>2024-02-08T22:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data, unexpected value count</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677053#M80211</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you see what every i am trying its getting two same values&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20240209_093755.jpg" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/29320iB49B3D7DD2216C07/image-size/large?v=v2&amp;amp;px=999" role="button" title="20240209_093755.jpg" alt="20240209_093755.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 09:47:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677053#M80211</guid>
      <dc:creator>phanikumarcs</dc:creator>
      <dc:date>2024-02-09T09:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data, unexpected value count</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677084#M80212</link>
      <description>&lt;P&gt;It looks like you have found 2 events in your search not 1, but your screenshot doesn't show how many events were returned. You could also look in your search log to see what is happening.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 13:23:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677084#M80212</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-09T13:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data, unexpected value count</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677095#M80214</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213178"&gt;@danielcj&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;In this instance, I am utilizing the SPL. The most recent event I am obtaining is from a table, where I encounter repeated values in the 'destination field which is 2.'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=foo sourcetype="foo" source="foo"
| spath input=_raw output=analytics path="analytics{}"
| rename "analytics{}.destination" as destination, "analytics{}.messages" as messages, "analytics{}.inflightMessages" as inflightMessages
| sort 0 -_time
| eventstats max(_time) as latestTime
| where _time = latestTime
| table destination, messages, inflightMessages&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Feb 2024 15:02:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677095#M80214</guid>
      <dc:creator>phanikumarcs</dc:creator>
      <dc:date>2024-02-09T15:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data, unexpected value count</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677099#M80215</link>
      <description>&lt;P&gt;There is nothing in this search that ensures you only have one event - you could have two events with exactly the same _time value - try something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| sort 0 -_time
| head 1&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Feb 2024 14:21:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677099#M80215</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-09T14:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data, unexpected value count</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677111#M80216</link>
      <description>&lt;P&gt;i tried this as well earlier, may be the issue with MQ events.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 15:04:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677111#M80216</guid>
      <dc:creator>phanikumarcs</dc:creator>
      <dc:date>2024-02-09T15:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data, unexpected value count</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677116#M80217</link>
      <description>&lt;P&gt;Not sure where MQ events come into it. When you tried with sort and head 1,&amp;nbsp; what did you get?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 15:10:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677116#M80217</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-09T15:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data, unexpected value count</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677123#M80218</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;in the events only 1 event getting, when you see in statistics getting same 2 values under destination in table.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 15:19:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677123#M80218</guid>
      <dc:creator>phanikumarcs</dc:creator>
      <dc:date>2024-02-09T15:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: JSON data, unexpected value count</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677125#M80219</link>
      <description>&lt;P&gt;So the data is duplicated in the raw event?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2024 15:34:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/JSON-data-unexpected-value-count/m-p/677125#M80219</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-02-09T15:34:39Z</dc:date>
    </item>
  </channel>
</rss>

