<?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: Need some help with a JSON array in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706657#M239121</link>
    <description>&lt;P&gt;This got me on the right track and let me to the following:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-12-12 at 8.32.16 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33827iE706F1ED95AB619A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-12-12 at 8.32.16 AM.png" alt="Screenshot 2024-12-12 at 8.32.16 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Dec 2024 14:33:33 GMT</pubDate>
    <dc:creator>ScottW</dc:creator>
    <dc:date>2024-12-12T14:33:33Z</dc:date>
    <item>
      <title>Need some help with a JSON array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706595#M239103</link>
      <description>&lt;P&gt;Hi smart folks. I have the output of a REST API call as seen below. I need to split each of the records as delimited by the {} as it's own event with each of the key:values defined for each record.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[

  {

    "name": "ESSENTIAL",

    "status": "ENABLED",

    "compliance": "COMPLIANT",

    "consumptionCounter": 17,

    "daysOutOfCompliance": "-",

    "lastAuthorization": "Dec 11,2024 07:32:21 AM"

  },

  {

    "name": "ADVANTAGE",

    "status": "ENABLED",

    "compliance": "EVALUATION",

    "consumptionCounter": 0,

    "daysOutOfCompliance": "-",

    "lastAuthorization": "Jul 09,2024 22:49:25 PM"

  },

  {

    "name": "PREMIER",

    "status": "ENABLED",

    "compliance": "EVALUATION",

    "consumptionCounter": 0,

    "daysOutOfCompliance": "-",

    "lastAuthorization": "Aug 10,2024 21:10:44 PM"

  },

  {

    "name": "DEVICEADMIN",

    "status": "ENABLED",

    "compliance": "COMPLIANT",

    "consumptionCounter": 2,

    "daysOutOfCompliance": "-",

    "lastAuthorization": "Dec 11,2024 07:32:21 AM"

  },

  {

    "name": "VM",

    "status": "ENABLED",

    "compliance": "COMPLIANT",

    "consumptionCounter": 2,

    "daysOutOfCompliance": "-",

    "lastAuthorization": "Dec 11,2024 07:32:21 AM"

  }

]&lt;/LI-CODE&gt;
&lt;P class=""&gt;Thanks in advance for any help you all might offer to get me down the right track.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 00:44:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706595#M239103</guid>
      <dc:creator>ScottW</dc:creator>
      <dc:date>2024-12-12T00:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with a JSON array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706603#M239108</link>
      <description>&lt;P&gt;It would help to know what you've tried already so we don't waste time on that.&lt;/P&gt;&lt;P&gt;Consider these props settings&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[mysourcetype]
DATETIME_CONFIG = current
SHOULD_LINEMERGE = false
LINE_BREAKER = ([\r\n]+)\{
TRANSFORMS-parse_mysourcetype = parse_mysourcetype&lt;/LI-CODE&gt;&lt;P&gt;with these transforms:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[parse_mysourcetype]
REGEX = "([^"]+)":"([^"]+)
FORMAT = $1::$2&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 12 Dec 2024 00:47:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706603#M239108</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2024-12-12T00:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with a JSON array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706605#M239110</link>
      <description>&lt;P&gt;Assuming this is the output of a search, then make the search do this with that data - this assumes raw is a field containing that data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval json=json_array_to_mv(raw)
| fields - raw _time
| mvexpand json
| spath input=json
| fields - json&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 01:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706605#M239110</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-12-12T01:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with a JSON array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706650#M239119</link>
      <description>&lt;P&gt;Thank you for the help. This got me to the following:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-12-12 at 7.56.05 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33825i7F087382B8877B2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-12-12 at 7.56.05 AM.png" alt="Screenshot 2024-12-12 at 7.56.05 AM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-12-12 at 7.57.02 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33826i4994730158DD4BE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-12-12 at 7.57.02 AM.png" alt="Screenshot 2024-12-12 at 7.57.02 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am hoping to get to the point where the individual fields like "name" and "consumptionCounter" become their own fields so that I can do things like trend over time, average, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 13:59:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706650#M239119</guid>
      <dc:creator>ScottW</dc:creator>
      <dc:date>2024-12-12T13:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with a JSON array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706651#M239120</link>
      <description>&lt;P&gt;Hi Rich,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am starting from scratch here and am not a Splunk whisperer, so really starting from ground zero.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 14:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706651#M239120</guid>
      <dc:creator>ScottW</dc:creator>
      <dc:date>2024-12-12T14:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need some help with a JSON array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706657#M239121</link>
      <description>&lt;P&gt;This got me on the right track and let me to the following:&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-12-12 at 8.32.16 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/33827iE706F1ED95AB619A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-12-12 at 8.32.16 AM.png" alt="Screenshot 2024-12-12 at 8.32.16 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2024 14:33:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-some-help-with-a-JSON-array/m-p/706657#M239121</guid>
      <dc:creator>ScottW</dc:creator>
      <dc:date>2024-12-12T14:33:33Z</dc:date>
    </item>
  </channel>
</rss>

