<?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 can I extract ALL occurrences of a field from JSON file? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-ALL-occurrences-of-a-field-from-JSON-file/m-p/324357#M96796</link>
    <description>&lt;P&gt;Hey @Sanjay71, can you review your post and "XXX" out any sensitive fields? Answers is a public forum, so anyone can see this post by searching online. Specifically field 1 and 3 stood out.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Oct 2017 21:06:31 GMT</pubDate>
    <dc:creator>lfedak_splunk</dc:creator>
    <dc:date>2017-10-23T21:06:31Z</dc:date>
    <item>
      <title>How can I extract ALL occurrences of a field from JSON file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-ALL-occurrences-of-a-field-from-JSON-file/m-p/324356#M96795</link>
      <description>&lt;P&gt;23.10.2017 14:01:23.745 INFO [10.87.80.251 [1508785283744] POST /apps/globallog HTTP/1.1] InfoLoggerServiceImpl {"id":{"field1":"DDDDDDD","field2":"XXXXXX","field3":"XXXXXXX","field4":"BBBBBB"},"request":{"url":"&lt;A href="https://CCCCC-detail.html%22,%22timestamp%22:%222017.10.23"&gt;https://CCCCC-detail.html","timestamp":"2017.10.23&lt;/A&gt; 14:01:23.745"},"info":{"api":[{"NAME":"API1","CORRELATIONID":" VVVV","URL":"API1.json"},{"NAME":"API2","CORRELATIONID":" VVVV ","URL":"API2.json"}]}}&lt;/P&gt;

&lt;P&gt;Was able to extract the fields as Name/Values pairs; but only the first occurrence is extracted ie. API2 is not getting extracted&lt;BR /&gt;
From the above ONLY API1 was extractable but not "NAME":"API2","CORRELATIONID":" VVVV ","URL":"API2.json, I was assuming the below would have shown 2 URLs, 2 Names, 2 Correlation ID&lt;/P&gt;

&lt;P&gt;URL is calling 2 APIs and only one of them seems is extracted by the below syntax&lt;/P&gt;

&lt;P&gt;This was used to extract the name/value pairs&lt;BR /&gt;
[json_embedded]&lt;BR /&gt;
REGEX = "(\w+)"."(\S+?)"&lt;BR /&gt;
FORMAT = $1::$2&lt;/P&gt;

&lt;P&gt;Appreciate any help &lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 20:45:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-ALL-occurrences-of-a-field-from-JSON-file/m-p/324356#M96795</guid>
      <dc:creator>Sanjay71</dc:creator>
      <dc:date>2017-10-23T20:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract ALL occurrences of a field from JSON file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-ALL-occurrences-of-a-field-from-JSON-file/m-p/324357#M96796</link>
      <description>&lt;P&gt;Hey @Sanjay71, can you review your post and "XXX" out any sensitive fields? Answers is a public forum, so anyone can see this post by searching online. Specifically field 1 and 3 stood out.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 21:06:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-ALL-occurrences-of-a-field-from-JSON-file/m-p/324357#M96796</guid>
      <dc:creator>lfedak_splunk</dc:creator>
      <dc:date>2017-10-23T21:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract ALL occurrences of a field from JSON file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-ALL-occurrences-of-a-field-from-JSON-file/m-p/324358#M96797</link>
      <description>&lt;P&gt;23.10.2017 14:01:23.745 INFO [10.87.80.251 [1508785283744] POST /apps/globallog HTTP/1.1] InfoLoggerServiceImpl {"id":{"field1":"DDDDDDD","field2":"XXXXXX","field3":"XXXXXXX","field4":"BBBBBB"},"request":{"url":"&lt;A href="https://CCCCC-detail.html%22,%22timestamp%22:%222017.10.23"&gt;https://CCCCC-detail.html","timestamp":"2017.10.23&lt;/A&gt; 14:01:23.745"},"info":{"api":[{"NAME":"API1","CORRELATIONID":" VVVV","URL":"API1.json"},{"NAME":"API2","CORRELATIONID":" VVVV ","URL":"API2.json"}]}}&lt;/P&gt;

&lt;P&gt;Was able to extract the fields as Name/Values pairs; but only the first occurrence is extracted ie. API2 is not getting extracted &lt;BR /&gt;
From the above ONLY API1 was extractable but not "NAME":"API2","CORRELATIONID":" VVVV ","URL":"API2.json, I was assuming the below would have shown 2 URLs, 2 Names, 2 Correlation ID&lt;/P&gt;

&lt;P&gt;URL is calling 2 APIs and only one of them seems is extracted by the below syntax&lt;/P&gt;

&lt;P&gt;This was used to extract the name/value pairs&lt;BR /&gt;
[json_embedded]&lt;BR /&gt;
 REGEX = "(\w+)"."(\S+?)"&lt;BR /&gt;
 FORMAT = $1::$2&lt;/P&gt;

&lt;P&gt;Appreciate any help &lt;/P&gt;</description>
      <pubDate>Mon, 23 Oct 2017 23:10:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-ALL-occurrences-of-a-field-from-JSON-file/m-p/324358#M96797</guid>
      <dc:creator>Sanjay71</dc:creator>
      <dc:date>2017-10-23T23:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract ALL occurrences of a field from JSON file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-ALL-occurrences-of-a-field-from-JSON-file/m-p/324359#M96798</link>
      <description>&lt;P&gt;Hi @lfedak - any thoughts on my question? Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 17:48:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-ALL-occurrences-of-a-field-from-JSON-file/m-p/324359#M96798</guid>
      <dc:creator>Sanjay71</dc:creator>
      <dc:date>2017-11-06T17:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I extract ALL occurrences of a field from JSON file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-ALL-occurrences-of-a-field-from-JSON-file/m-p/324360#M96799</link>
      <description>&lt;P&gt;Use this for your transforms.conf entry&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[json_embedded]
REGEX = "(\w+)"."(\S+?)"
FORMAT = $1::$2
REPEAT_MATCH = true
MV_ADD = true
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Reference: &lt;A href="https://answers.splunk.com/answers/484037/multi-value-field-extraction-propsconf-transformsc.html"&gt;https://answers.splunk.com/answers/484037/multi-value-field-extraction-propsconf-transformsc.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 18:49:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-extract-ALL-occurrences-of-a-field-from-JSON-file/m-p/324360#M96799</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-11-06T18:49:14Z</dc:date>
    </item>
  </channel>
</rss>

