<?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: Grouping by items in an array in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Grouping-by-items-in-an-array/m-p/559037#M92480</link>
    <description>&lt;P&gt;Thanks a million for the reply.&lt;/P&gt;&lt;P&gt;It really helped focus me in the correct direction.&lt;/P&gt;&lt;P&gt;I ended up having to put an explicit spath before each of my search command that referenced one of the complex object properties.&lt;/P&gt;&lt;P&gt;similar to:&lt;/P&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath books{}.name
| search books{}.name
| top books{}.name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-panel lia-panel-standard MessageTagsTaplet Chrome lia-component-message-view-widget-tags"&gt;&lt;DIV class="lia-decoration-border"&gt;&lt;DIV class="lia-decoration-border-top"&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-decoration-border-content"&gt;&lt;DIV&gt;&lt;DIV class="lia-panel-content-wrapper"&gt;&lt;DIV class="lia-panel-content"&gt;&lt;DIV class="AddMessageTags lia-message-tags"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 12 Jul 2021 07:21:45 GMT</pubDate>
    <dc:creator>Maurice</dc:creator>
    <dc:date>2021-07-12T07:21:45Z</dc:date>
    <item>
      <title>Grouping by items in an array</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Grouping-by-items-in-an-array/m-p/558832#M92447</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm hoping someone can help me out here.&lt;/P&gt;&lt;P&gt;I have a property(books) on &lt;STRONG&gt;each&lt;/STRONG&gt; event which holds an array of objects.&lt;/P&gt;&lt;P&gt;I would like to group by books{}.name with count on y axis and create a bar chart.&lt;/P&gt;&lt;P&gt;I tried using &lt;STRONG&gt;top&amp;nbsp;books{}.name&lt;/STRONG&gt; but this does not seem to give the correct results, seems to miss out on some groups all together&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;books:[&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {name: "book1"},&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;{name: "book2"},&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;{name: "book3"},&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;{name: "book3"},&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;{name: "book1"},&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;{name: "book1"},&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Would you have an idea of how to fix this,&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Maurice&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 12:55:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Grouping-by-items-in-an-array/m-p/558832#M92447</guid>
      <dc:creator>Maurice</dc:creator>
      <dc:date>2021-07-09T12:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping by items in an array</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Grouping-by-items-in-an-array/m-p/558834#M92448</link>
      <description>&lt;P&gt;Are you extracting the fields with spath first?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="{
\"books\":[
{\"name\": \"book1\"},
{\"name\": \"book2\"},
{\"name\": \"book3\"},
{\"name\": \"book3\"},
{\"name\": \"book1\"},
{\"name\": \"book1\"},
      ]
}"
| spath
| top books{}.name&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 09 Jul 2021 13:04:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Grouping-by-items-in-an-array/m-p/558834#M92448</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-07-09T13:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Grouping by items in an array</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Grouping-by-items-in-an-array/m-p/559037#M92480</link>
      <description>&lt;P&gt;Thanks a million for the reply.&lt;/P&gt;&lt;P&gt;It really helped focus me in the correct direction.&lt;/P&gt;&lt;P&gt;I ended up having to put an explicit spath before each of my search command that referenced one of the complex object properties.&lt;/P&gt;&lt;P&gt;similar to:&lt;/P&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath books{}.name
| search books{}.name
| top books{}.name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="lia-panel lia-panel-standard MessageTagsTaplet Chrome lia-component-message-view-widget-tags"&gt;&lt;DIV class="lia-decoration-border"&gt;&lt;DIV class="lia-decoration-border-top"&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-decoration-border-content"&gt;&lt;DIV&gt;&lt;DIV class="lia-panel-content-wrapper"&gt;&lt;DIV class="lia-panel-content"&gt;&lt;DIV class="AddMessageTags lia-message-tags"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 12 Jul 2021 07:21:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Grouping-by-items-in-an-array/m-p/559037#M92480</guid>
      <dc:creator>Maurice</dc:creator>
      <dc:date>2021-07-12T07:21:45Z</dc:date>
    </item>
  </channel>
</rss>

