<?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 to remove prefix from json array. in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499555#M85146</link>
    <description>&lt;P&gt;i just want to remove header part during indexing remaining parsing field regex i can write....&lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2020 12:54:28 GMT</pubDate>
    <dc:creator>vin02ptl</dc:creator>
    <dc:date>2020-05-15T12:54:28Z</dc:date>
    <item>
      <title>Need to remove prefix from json array.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499550#M85141</link>
      <description>&lt;P&gt;Need to remove prefix from json array. I want to remove everything before {"id"&lt;/P&gt;

&lt;P&gt;{"@odata.context":"&lt;A href="https://graph.microsoft.com/v1.0/$metadata#auditLogs/directoryAudits%22,%22value%22:%5B%7B%22id"&gt;https://graph.microsoft.com/v1.0/$metadata#auditLogs/directoryAudits","value":[{"id&lt;/A&gt;"&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 10:10:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499550#M85141</guid>
      <dc:creator>vin02ptl</dc:creator>
      <dc:date>2020-05-15T10:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove prefix from json array.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499551#M85142</link>
      <description>&lt;P&gt;Hi @vin02ptl,&lt;BR /&gt;
please, could you share an example of your logs?&lt;BR /&gt;
Anyway, I solved this problem with this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "[^\{]*(?&amp;lt;all&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 10:16:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499551#M85142</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-05-15T10:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove prefix from json array.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499552#M85143</link>
      <description>&lt;P&gt;how to write in props.conf&lt;/P&gt;

&lt;P&gt;{"@odata.context":"&lt;A href="https://graph.microsoft.com/v1.0/$metadata#auditLogs/directoryAudits%22,%22value%22:%5B%5D"&gt;https://graph.microsoft.com/v1.0/$metadata#auditLogs/directoryAudits","value":[]&lt;/A&gt;}&lt;BR /&gt;
{"@odata.context":"&lt;A href="https://graph.microsoft.com/v1.0/$metadata#auditLogs/directoryAudits%22,%22value%22:%5B%5D"&gt;https://graph.microsoft.com/v1.0/$metadata#auditLogs/directoryAudits","value":[]&lt;/A&gt;}&lt;BR /&gt;
{"@odata.context":"&lt;A href="https://graph.microsoft.com/v1.0/$metadata#auditLogs/directoryAudits%22,%22value%22:%5B%7B%22id%22:%22B2Cxx%22,%22category%22:%22xxx%22,%22correlationId%22:xxx,%22activityDateTime%22:%22xxx%22....%7D,%7B%22id%22:%22B2Cxx%22,%22category%22:%22xxx%22,%22correlationId%22:xxx,%22activityDateTime%22:%22xxx%22....%7D,%7B%22id%22:%22B2Cxx%22,%22category%22:%22xxx%22,%22correlationId%22:xxx,%22activityDateTime%22:%22xxx%22....%7D%5D"&gt;https://graph.microsoft.com/v1.0/$metadata#auditLogs/directoryAudits","value":[{"id":"B2Cxx","category":"xxx","correlationId":xxx,"activityDateTime":"xxx"....},{"id":"B2Cxx","category":"xxx","correlationId":xxx,"activityDateTime":"xxx"....},{"id":"B2Cxx","category":"xxx","correlationId":xxx,"activityDateTime":"xxx"....}]&lt;/A&gt;}&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 10:25:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499552#M85143</guid>
      <dc:creator>vin02ptl</dc:creator>
      <dc:date>2020-05-15T10:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove prefix from json array.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499553#M85144</link>
      <description>&lt;P&gt;@gcusello please have a look and advice&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 11:18:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499553#M85144</guid>
      <dc:creator>vin02ptl</dc:creator>
      <dc:date>2020-05-15T11:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove prefix from json array.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499554#M85145</link>
      <description>&lt;P&gt;Hi @vin02ptl,&lt;BR /&gt;
Thy this regex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\"id\":\"(?&amp;lt;id&amp;gt;[^\"]+)\",\"category\":\"(?&amp;lt;category&amp;gt;[^\"]+)\",\"correlationId\":(?&amp;lt;correlationId&amp;gt;[^\"]+),\"activityDateTime\":\"(?&amp;lt;activityDateTime&amp;gt;[^\"]+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/StogWZ/1"&gt;https://regex101.com/r/StogWZ/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 12:33:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499554#M85145</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-05-15T12:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove prefix from json array.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499555#M85146</link>
      <description>&lt;P&gt;i just want to remove header part during indexing remaining parsing field regex i can write....&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 12:54:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499555#M85146</guid>
      <dc:creator>vin02ptl</dc:creator>
      <dc:date>2020-05-15T12:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove prefix from json array.</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499556#M85147</link>
      <description>&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[odata]
CHARSET=UTF-8
DATETIME_CONFIG = CURRENT
INDEXED_EXTRACTION = none
KV_MODE = json
LINE_BREAKER = (.*:\[){\"id|}(,)|(\]})
NO_BINARY_CHECK = true
SHOULD_LINEMERGE = false
disabled = false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;please modify &lt;CODE&gt;DATETIME_CONFIG&lt;/CODE&gt;    &lt;/P&gt;

&lt;P&gt;If you don't present your log properly(you should use &lt;EM&gt;code sample&lt;/EM&gt;), you can't expect a response.&lt;/P&gt;</description>
      <pubDate>Sun, 17 May 2020 00:07:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-to-remove-prefix-from-json-array/m-p/499556#M85147</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-17T00:07:42Z</dc:date>
    </item>
  </channel>
</rss>

