<?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 Help extracting json at index time in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Help-extracting-json-at-index-time/m-p/649906#M110447</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a scripted input that runs a py script which returns json in this format in a single line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[
    {
        "address": "blah@blah.com",
        "timeRanges":
        [
            {
                "start": "2023-05-22T12:59:00.000Z",
                "end": "2023-05-25T13:48:19.000Z",
            },
            {
                "start": "2023-06-12T04:06:56.000Z",
            }
        ],
    },
    {
        "address": "blah1@blah1.com",
        "timeRanges":
        [
            {
                "start": "2023-07-01T15:00:00.000Z",
                "end": "2023-07-05T04:38:08.000Z",
            }
        ],
   }
]&lt;/LI-CODE&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;&lt;P&gt;Splunk indexes everything as a single record as below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="olegr_0-1689026255162.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/26198iA365A83DC136909C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="olegr_0-1689026255162.png" alt="olegr_0-1689026255162.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Looking for a way to extract each object into its own record.&amp;nbsp; When I import the file via the GUI, it parses it correctly, but not via the scripted input.&amp;nbsp; Props:&lt;/P&gt;&lt;P&gt;[my-source-type]&lt;BR /&gt;NO_BINARY_CHECK = true&lt;BR /&gt;INDEXED_EXTRACTIONS = json&lt;BR /&gt;KV_MODE = none&lt;BR /&gt;SHOULD_LINEMERGE = true&lt;BR /&gt;TRUNCATE = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Jul 2023 22:01:53 GMT</pubDate>
    <dc:creator>olegr</dc:creator>
    <dc:date>2023-07-10T22:01:53Z</dc:date>
    <item>
      <title>Help extracting json at index time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-extracting-json-at-index-time/m-p/649906#M110447</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a scripted input that runs a py script which returns json in this format in a single line:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;[
    {
        "address": "blah@blah.com",
        "timeRanges":
        [
            {
                "start": "2023-05-22T12:59:00.000Z",
                "end": "2023-05-25T13:48:19.000Z",
            },
            {
                "start": "2023-06-12T04:06:56.000Z",
            }
        ],
    },
    {
        "address": "blah1@blah1.com",
        "timeRanges":
        [
            {
                "start": "2023-07-01T15:00:00.000Z",
                "end": "2023-07-05T04:38:08.000Z",
            }
        ],
   }
]&lt;/LI-CODE&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;&lt;P&gt;Splunk indexes everything as a single record as below.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="olegr_0-1689026255162.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/26198iA365A83DC136909C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="olegr_0-1689026255162.png" alt="olegr_0-1689026255162.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Looking for a way to extract each object into its own record.&amp;nbsp; When I import the file via the GUI, it parses it correctly, but not via the scripted input.&amp;nbsp; Props:&lt;/P&gt;&lt;P&gt;[my-source-type]&lt;BR /&gt;NO_BINARY_CHECK = true&lt;BR /&gt;INDEXED_EXTRACTIONS = json&lt;BR /&gt;KV_MODE = none&lt;BR /&gt;SHOULD_LINEMERGE = true&lt;BR /&gt;TRUNCATE = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jul 2023 22:01:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-extracting-json-at-index-time/m-p/649906#M110447</guid>
      <dc:creator>olegr</dc:creator>
      <dc:date>2023-07-10T22:01:53Z</dc:date>
    </item>
  </channel>
</rss>

