<?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: Extracting Nested JSON Fields and Array from Splunk Data Using spath in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647517#M224115</link>
    <description>&lt;P&gt;nope still everything (the event) is ONLY appearing in 'message' and I get &lt;SPAN&gt;Field 'relationships' does not exist in the data.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 Jun 2023 18:10:54 GMT</pubDate>
    <dc:creator>siksaw33</dc:creator>
    <dc:date>2023-06-19T18:10:54Z</dc:date>
    <item>
      <title>How to extract nested JSON fields and array from Splunk data using spath?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647510#M224109</link>
      <description>&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;P&gt;I'm trying to extract some information from nested JSON data stored in Splunk. Here's a simplified and anonymized example of the type of data I'm dealing with:&lt;/P&gt;
&lt;PRE&gt;    {
    &lt;SPAN class=""&gt;"functionAddress"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"ReadAccounts.v1/3.5.0"&lt;/SPAN&gt;,
    &lt;SPAN class=""&gt;"responseTime"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;15&lt;/SPAN&gt;,
    &lt;SPAN class=""&gt;"httpStatus"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;200&lt;/SPAN&gt;,
    &lt;SPAN class=""&gt;"additionalParameters"&lt;/SPAN&gt;: {
        &lt;SPAN class=""&gt;"locale"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"en-US"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"accountToken"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"XYZ123ABC456"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"productType"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"CARD_ACCOUNT"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"primaryAccountToken"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"XYZ123ABC456"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"accountBalance"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"3722494"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"accountStatus"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"ACTIVE"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"relationShipStatus"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"ACTIVE"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"numberOfLinkedCards"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;14&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"primary"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;true&lt;/SPAN&gt;
    },
    &lt;SPAN class=""&gt;"response"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"[{&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;status&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:{&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;code&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;0000&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;message&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;SUCCESS&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;},&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;accountToken&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;XYZ123ABC456&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;accountIdentifier&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;1M06093364&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;accountStatus&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;ACTIVE&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;relationships&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:[{&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;accountToken&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;XYZ789GHI012&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;primary&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:false,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;status&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;ACTIVE&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;displayAccountNumber&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;91115&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;productRelationshipType&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;ACCOUNT&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;},{&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;accountToken&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;JKL345MNO678&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;primary&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:false,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;status&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;ACTIVE&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;displayAccountNumber&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;91107&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;productRelationshipType&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;ACCOUNT&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;}]}]"&lt;/SPAN&gt;
}&lt;/PRE&gt;
&lt;P&gt;The response field is a JSON string that contains an array (even if there's only one element). Inside this array, there's a relationships array that can contain multiple elements.&lt;/P&gt;
&lt;P&gt;I'm trying to extract the accountToken, accountIdentifier, accountStatus fields and all the relationships from this data into a table. So far, I've tried the following query but it doesn't seem to work as expected:&lt;/P&gt;
&lt;PRE&gt;    index=my_index ReadAccounts relationshipStatus en-US CANCELLED
| spath &lt;SPAN class=""&gt;input&lt;/SPAN&gt;=response &lt;SPAN class=""&gt;path&lt;/SPAN&gt;={}.accountToken &lt;SPAN class=""&gt;output&lt;/SPAN&gt;=accountToken
| spath &lt;SPAN class=""&gt;input&lt;/SPAN&gt;=response &lt;SPAN class=""&gt;path&lt;/SPAN&gt;={}.accountIdentifier &lt;SPAN class=""&gt;output&lt;/SPAN&gt;=accountIdentifier
| spath &lt;SPAN class=""&gt;input&lt;/SPAN&gt;=response &lt;SPAN class=""&gt;path&lt;/SPAN&gt;={}.accountStatus &lt;SPAN class=""&gt;output&lt;/SPAN&gt;=accountStatus
| spath &lt;SPAN class=""&gt;input&lt;/SPAN&gt;=response &lt;SPAN class=""&gt;path&lt;/SPAN&gt;={}.relationships{} &lt;SPAN class=""&gt;output&lt;/SPAN&gt;=relationships
| mvexpand relationships
| &lt;SPAN class=""&gt;rename&lt;/SPAN&gt; relationships as _raw
| spath &lt;SPAN class=""&gt;input&lt;/SPAN&gt;=_raw &lt;SPAN class=""&gt;path&lt;/SPAN&gt;=accountToken &lt;SPAN class=""&gt;output&lt;/SPAN&gt;=relationship_accountToken
| spath &lt;SPAN class=""&gt;input&lt;/SPAN&gt;=_raw &lt;SPAN class=""&gt;path&lt;/SPAN&gt;=primary &lt;SPAN class=""&gt;output&lt;/SPAN&gt;=relationship_primary
| spath &lt;SPAN class=""&gt;input&lt;/SPAN&gt;=_raw &lt;SPAN class=""&gt;path&lt;/SPAN&gt;=&lt;SPAN class=""&gt;status&lt;/SPAN&gt; &lt;SPAN class=""&gt;output&lt;/SPAN&gt;=relationship_status
| spath &lt;SPAN class=""&gt;input&lt;/SPAN&gt;=_raw &lt;SPAN class=""&gt;path&lt;/SPAN&gt;=displayAccountNumber &lt;SPAN class=""&gt;output&lt;/SPAN&gt;=relationship_displayAccountNumber
| spath &lt;SPAN class=""&gt;input&lt;/SPAN&gt;=_raw &lt;SPAN class=""&gt;path&lt;/SPAN&gt;=productRelationshipType &lt;SPAN class=""&gt;output&lt;/SPAN&gt;=relationship_productRelationshipType
| &lt;SPAN class=""&gt;table&lt;/SPAN&gt; _time, message, accountToken, accountIdentifier, accountStatus, relationship_accountToken, relationship_primary, relationship_status, relationship_displayAccountNumber, relationship_productRelationshipType
| head &lt;SPAN class=""&gt;10&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;P&gt;When I run this query, the table appears blank, except for the _time column and everything is still in message. Could someone please advise what might be going wrong and how I can correct it? I'm trying to extract each relationship as its own row in the table.&lt;/P&gt;
&lt;P&gt;Thank you in advance for any help you can provide.&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 20 Jun 2023 02:23:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647510#M224109</guid>
      <dc:creator>siksaw33</dc:creator>
      <dc:date>2023-06-20T02:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Nested JSON Fields and Array from Splunk Data Using spath</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647512#M224111</link>
      <description>&lt;LI-CODE lang="markup"&gt;| spath response
| spath input=response path={}.accountToken output=accountToken
| spath input=response path={}.accountIdentifier output=accountIdentifier
| spath input=response path={}.accountStatus output=accountStatus
| spath input=response path={}.relationships{} output=relationships
| mvexpand relationships
| rename relationships as _raw
| spath input=_raw path=accountToken output=relationship_accountToken
| spath input=_raw path=primary output=relationship_primary
| spath input=_raw path=status output=relationship_status
| spath input=_raw path=displayAccountNumber output=relationship_displayAccountNumber
| spath input=_raw path=productRelationshipType output=relationship_productRelationshipType
| table _time, message, accountToken, accountIdentifier, accountStatus, relationship_accountToken, relationship_primary, relationship_status, relationship_displayAccountNumber, relationship_productRelationshipType
| head 10&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 19 Jun 2023 17:22:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647512#M224111</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-19T17:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Nested JSON Fields and Array from Splunk Data Using spath</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647517#M224115</link>
      <description>&lt;P&gt;nope still everything (the event) is ONLY appearing in 'message' and I get &lt;SPAN&gt;Field 'relationships' does not exist in the data.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 18:10:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647517#M224115</guid>
      <dc:creator>siksaw33</dc:creator>
      <dc:date>2023-06-19T18:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Nested JSON Fields and Array from Splunk Data Using spath</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647526#M224117</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&lt;/SPAN&gt;and &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt; if you can review&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 20:15:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647526#M224117</guid>
      <dc:creator>siksaw33</dc:creator>
      <dc:date>2023-06-19T20:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Nested JSON Fields and Array from Splunk Data Using spath</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647528#M224119</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;or if you can share the link for runanywhere too&lt;/P&gt;</description>
      <pubDate>Mon, 19 Jun 2023 20:17:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647528#M224119</guid>
      <dc:creator>siksaw33</dc:creator>
      <dc:date>2023-06-19T20:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Nested JSON Fields and Array from Splunk Data Using spath</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647530#M224120</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;I forgot to mention that the message is the base JSON&lt;/P&gt;&lt;PRE&gt; message {
    &lt;SPAN class=""&gt;"functionAddress"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"ReadAccounts.v1/3.5.0"&lt;/SPAN&gt;,
    &lt;SPAN class=""&gt;"responseTime"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;15&lt;/SPAN&gt;,
    &lt;SPAN class=""&gt;"httpStatus"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;200&lt;/SPAN&gt;,
    &lt;SPAN class=""&gt;"additionalParameters"&lt;/SPAN&gt;: {
        &lt;SPAN class=""&gt;"locale"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"en-US"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"accountToken"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"XYZ123ABC456"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"productType"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"CARD_ACCOUNT"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"primaryAccountToken"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"XYZ123ABC456"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"accountBalance"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"3722494"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"accountStatus"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"ACTIVE"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"relationShipStatus"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"ACTIVE"&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"numberOfLinkedCards"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;14&lt;/SPAN&gt;,
        &lt;SPAN class=""&gt;"primary"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;true&lt;/SPAN&gt;
    },
    &lt;SPAN class=""&gt;"response"&lt;/SPAN&gt;: &lt;SPAN class=""&gt;"[{&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;status&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:{&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;code&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;0000&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;message&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;SUCCESS&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;},&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;accountToken&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;XYZ123ABC456&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;accountIdentifier&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;1M06093364&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;accountStatus&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;ACTIVE&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;relationships&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:[{&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;accountToken&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;XYZ789GHI012&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;primary&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:false,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;status&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;ACTIVE&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;displayAccountNumber&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;91115&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;productRelationshipType&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;ACCOUNT&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;},{&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;accountToken&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;JKL345MNO678&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;primary&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:false,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;status&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;ACTIVE&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;displayAccountNumber&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;91107&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;,&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;productRelationshipType&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;:&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;ACCOUNT&lt;SPAN class=""&gt;\"&lt;/SPAN&gt;}]}]"&lt;/SPAN&gt;
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Jun 2023 21:09:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647530#M224120</guid>
      <dc:creator>siksaw33</dc:creator>
      <dc:date>2023-06-19T21:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Nested JSON Fields and Array from Splunk Data Using spath</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647549#M224127</link>
      <description>&lt;P&gt;All the information is in messages.response. &amp;nbsp;This is a field that Splunk should have already given you. (And Splunk cannot give you field "response" for use as input for spath.) &amp;nbsp;The string value is itself an escaped JSON object. &amp;nbsp;So,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath input=message.response path={}
| mvexpand {}
| spath input={}
| rename account* as response_account*, status.* as response_status.*
| spath input={} path=relationships{}
| mvexpand relationships{}
| spath input=relationships{}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, you missed quotation marks surrounding "message", and brackets surrounding the entire structure. &amp;nbsp;The sample data give me&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;accountToken&lt;/TD&gt;&lt;TD&gt;displayAccountNumber&lt;/TD&gt;&lt;TD&gt;primary&lt;/TD&gt;&lt;TD&gt;productRelationshipType&lt;/TD&gt;&lt;TD&gt;response_accountIdentifier&lt;/TD&gt;&lt;TD&gt;response_accountStatus&lt;/TD&gt;&lt;TD&gt;response_accountToken&lt;/TD&gt;&lt;TD&gt;response_status.code&lt;/TD&gt;&lt;TD&gt;response_status.message&lt;/TD&gt;&lt;TD&gt;status&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;XYZ789GHI012&lt;/TD&gt;&lt;TD&gt;91115&lt;/TD&gt;&lt;TD&gt;false&lt;/TD&gt;&lt;TD&gt;ACCOUNT&lt;/TD&gt;&lt;TD&gt;1M06093364&lt;/TD&gt;&lt;TD&gt;ACTIVE&lt;/TD&gt;&lt;TD&gt;XYZ123ABC456&lt;/TD&gt;&lt;TD&gt;0000&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;TD&gt;ACTIVE&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;JKL345MNO678&lt;/TD&gt;&lt;TD&gt;91107&lt;/TD&gt;&lt;TD&gt;false&lt;/TD&gt;&lt;TD&gt;ACCOUNT&lt;/TD&gt;&lt;TD&gt;1M06093364&lt;/TD&gt;&lt;TD&gt;ACTIVE&lt;/TD&gt;&lt;TD&gt;XYZ123ABC456&lt;/TD&gt;&lt;TD&gt;0000&lt;/TD&gt;&lt;TD&gt;SUCCESS&lt;/TD&gt;&lt;TD&gt;ACTIVE&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Here is a data emulation that you can play with and compare with raw data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw = "{\"message\": {
    \"functionAddress\": \"ReadAccounts.v1/3.5.0\",
    \"responseTime\": 15,
    \"httpStatus\": 200,
    \"additionalParameters\": {
        \"locale\": \"en-US\",
        \"accountToken\": \"XYZ123ABC456\",
        \"productType\": \"CARD_ACCOUNT\",
        \"primaryAccountToken\": \"XYZ123ABC456\",
        \"accountBalance\": \"3722494\",
        \"accountStatus\": \"ACTIVE\",
        \"relationShipStatus\": \"ACTIVE\",
        \"numberOfLinkedCards\": 14,
        \"primary\": true
    },
    \"response\": \"[{\\\"status\\\":{\\\"code\\\":\\\"0000\\\",\\\"message\\\":\\\"SUCCESS\\\"},\\\"accountToken\\\":\\\"XYZ123ABC456\\\",\\\"accountIdentifier\\\":\\\"1M06093364\\\",\\\"accountStatus\\\":\\\"ACTIVE\\\",\\\"relationships\\\":[{\\\"accountToken\\\":\\\"XYZ789GHI012\\\",\\\"primary\\\":false,\\\"status\\\":\\\"ACTIVE\\\",\\\"displayAccountNumber\\\":\\\"91115\\\",\\\"productRelationshipType\\\":\\\"ACCOUNT\\\"},{\\\"accountToken\\\":\\\"JKL345MNO678\\\",\\\"primary\\\":false,\\\"status\\\":\\\"ACTIVE\\\",\\\"displayAccountNumber\\\":\\\"91107\\\",\\\"productRelationshipType\\\":\\\"ACCOUNT\\\"}]}]\"
}
}"
| spath
``` data emulation above ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 07:52:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647549#M224127</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-06-20T07:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting Nested JSON Fields and Array from Splunk Data Using spath</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647552#M224129</link>
      <description>&lt;P&gt;This runanywhere example is based on the data you did share, which by the way doesn't show the message field. if you want a more cogent example, you will have to provide an more accurate representation of your actual events.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw="    {
    \"functionAddress\": \"ReadAccounts.v1/3.5.0\",
    \"responseTime\": 15,
    \"httpStatus\": 200,
    \"additionalParameters\": {
        \"locale\": \"en-US\",
        \"accountToken\": \"XYZ123ABC456\",
        \"productType\": \"CARD_ACCOUNT\",
        \"primaryAccountToken\": \"XYZ123ABC456\",
        \"accountBalance\": \"3722494\",
        \"accountStatus\": \"ACTIVE\",
        \"relationShipStatus\": \"ACTIVE\",
        \"numberOfLinkedCards\": 14,
        \"primary\": true
    },
    \"response\": \"[{\\\"status\\\":{\\\"code\\\":\\\"0000\\\",\\\"message\\\":\\\"SUCCESS\\\"},\\\"accountToken\\\":\\\"XYZ123ABC456\\\",\\\"accountIdentifier\\\":\\\"1M06093364\\\",\\\"accountStatus\\\":\\\"ACTIVE\\\",\\\"relationships\\\":[{\\\"accountToken\\\":\\\"XYZ789GHI012\\\",\\\"primary\\\":false,\\\"status\\\":\\\"ACTIVE\\\",\\\"displayAccountNumber\\\":\\\"91115\\\",\\\"productRelationshipType\\\":\\\"ACCOUNT\\\"},{\\\"accountToken\\\":\\\"JKL345MNO678\\\",\\\"primary\\\":false,\\\"status\\\":\\\"ACTIVE\\\",\\\"displayAccountNumber\\\":\\\"91107\\\",\\\"productRelationshipType\\\":\\\"ACCOUNT\\\"}]}]\"
}"
| spath response
| spath input=response path={}.accountToken output=accountToken
| spath input=response path={}.accountIdentifier output=accountIdentifier
| spath input=response path={}.accountStatus output=accountStatus
| spath input=response path={}.relationships{} output=relationships
| mvexpand relationships
| rename relationships as _raw
| spath input=_raw path=accountToken output=relationship_accountToken
| spath input=_raw path=primary output=relationship_primary
| spath input=_raw path=status output=relationship_status
| spath input=_raw path=displayAccountNumber output=relationship_displayAccountNumber
| spath input=_raw path=productRelationshipType output=relationship_productRelationshipType
| table _time, message, accountToken, accountIdentifier, accountStatus, relationship_accountToken, relationship_primary, relationship_status, relationship_displayAccountNumber, relationship_productRelationshipType
| head 10&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 20 Jun 2023 08:12:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647552#M224129</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-20T08:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract nested JSON fields and array from Splunk data using spath?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647687#M224156</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp; sorry I am a Splunk Noob, can you please update your query, this is the entire JSON&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "functionAddress":"Function.v1/3.5.0",
  "responseTime":15,
  "httpStatus":200,
  "additionalParameters":{
    "locale":"en-US",
    "channel":"WEB",
    "accountToken":"Token1",
    "productType":"Product1",
    "primaryAccountToken":"Token1",
    "programTier":"Tier1",
    "programType":"Program1",
    "accountBalance":"3722494",
    "accountStatus":"ACTIVE",
    "relationShipStatus":"ACTIVE",
    "numberOfLinkedAccounts":14,
    "basic":true,
    "primary":true
  },
  "response":[
    {
      "status":{
        "code":"0000",
        "message":"SUCCESS"
      },
      "accountToken":"Token1",
      "accountIdentifier":"1M06093364",
      "accountStatus":"ACTIVE",
      "programCode":"Code1",
      "programTier":"Tier1",
      "tierDescription":"Tier First",
      "programType":"Program1",
      "currentBalance":{
        "currencyType":"POINTS",
        "value":3722494
      },
      "accountBalance":{
        "availableBalance":[
          {
            "type":"POINTS",
            "name":"POINTS",
            "pointCount":"3722494"
          }
        ]
      },
      "enrollmentIndicator":true,
      "redemptionIndicator":true,
      "accountAuthorized":true,
      "featureSetIdentifier":"PR",
      "relationships":[
        {
          "accountToken":"Token2",
          "primary":false,
          "status":"ACTIVE",
          "displayAccountNumber":"91115",
          "productRelationshipType":"Product2"
        },
        {
          "accountToken":"Token3",
          "primary":false,
          "status":"CANCELLED",
          "displayAccountNumber":"91016",
          "productRelationshipType":"Product3"
        },
        // more relationship objects here
      ],
      "locale":"en-US",
      "isBasic":true
    }
  ]
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 20 Jun 2023 23:48:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647687#M224156</guid>
      <dc:creator>siksaw33</dc:creator>
      <dc:date>2023-06-20T23:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract nested JSON fields and array from Splunk data using spath?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647688#M224157</link>
      <description>&lt;P&gt;I can post another question if this reply is too complicated&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 00:01:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647688#M224157</guid>
      <dc:creator>siksaw33</dc:creator>
      <dc:date>2023-06-21T00:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract nested JSON fields and array from Splunk data using spath?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647706#M224160</link>
      <description>&lt;P&gt;This still doesn't appear to have a message field - unless this is the message field?&lt;/P&gt;&lt;P&gt;It is often more helpful to share the entire _raw field so we can see what you are dealing with.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 06:26:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647706#M224160</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-21T06:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract nested JSON fields and array from Splunk data using spath?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647717#M224163</link>
      <description>&lt;P&gt;This changes the entire structure of the &lt;U&gt;response&lt;/U&gt; field. &amp;nbsp;You realize that, right? &amp;nbsp;response in the original sample you posted is a string with escaped JSON. &amp;nbsp;In this sample, response is regular JSON. &amp;nbsp;It is just as easy to extract data, but different data requires different code. &amp;nbsp;The data contain several arrays. &amp;nbsp;So, you need to apply several path-mvexpand combinations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath path=response{}
| mvexpand response{}
| spath input=response{}
| spath input=response{} path=accountBalance.availableBalance{}
| mvexpand accountBalance.availableBalance{}
| spath input=accountBalance.availableBalance{}
| rename type as response_availableBalance_type, name as response_availableBalance_name, pointCount as response_availableBalance_pointCount
| rename account* as response_account*
| spath input=response{} path=relationships{}
| mvexpand relationships{}
| spath input=relationships{}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The new sample gives me&lt;/P&gt;&lt;TABLE width="6412px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="113.65625px"&gt;accountToken&lt;/TD&gt;&lt;TD width="286.3125px"&gt;additionalParameters.accountBalance&lt;/TD&gt;&lt;TD width="275.640625px"&gt;additionalParameters.accountStatus&lt;/TD&gt;&lt;TD width="271.96875px"&gt;additionalParameters.accountToken&lt;/TD&gt;&lt;TD width="207.578125px"&gt;additionalParameters.basic&lt;/TD&gt;&lt;TD width="226.515625px"&gt;additionalParameters.channel&lt;/TD&gt;&lt;TD width="212.359375px"&gt;additionalParameters.locale&lt;/TD&gt;&lt;TD width="358.765625px"&gt;additionalParameters.numberOfLinkedAccounts&lt;/TD&gt;&lt;TD width="225.1875px"&gt;additionalParameters.primary&lt;/TD&gt;&lt;TD width="329.328125px"&gt;additionalParameters.primaryAccountToken&lt;/TD&gt;&lt;TD width="262.171875px"&gt;additionalParameters.productType&lt;/TD&gt;&lt;TD width="258.1875px"&gt;additionalParameters.programTier&lt;/TD&gt;&lt;TD width="265.796875px"&gt;additionalParameters.programType&lt;/TD&gt;&lt;TD width="303.546875px"&gt;additionalParameters.relationShipStatus&lt;/TD&gt;&lt;TD width="224.578125px"&gt;currentBalance.currencyType&lt;/TD&gt;&lt;TD width="162.53125px"&gt;currentBalance.value&lt;/TD&gt;&lt;TD width="180.703125px"&gt;displayAccountNumber&lt;/TD&gt;&lt;TD width="153.65625px"&gt;enrollmentIndicator&lt;/TD&gt;&lt;TD width="153.0625px"&gt;featureSetIdentifier&lt;/TD&gt;&lt;TD width="137.0625px"&gt;functionAddress&lt;/TD&gt;&lt;TD width="88.375px"&gt;httpStatus&lt;/TD&gt;&lt;TD width="61.453125px"&gt;isBasic&lt;/TD&gt;&lt;TD width="54.046875px"&gt;locale&lt;/TD&gt;&lt;TD width="66.875px"&gt;primary&lt;/TD&gt;&lt;TD width="193.4375px"&gt;productRelationshipType&lt;/TD&gt;&lt;TD width="110.5px"&gt;programCode&lt;/TD&gt;&lt;TD width="99.890625px"&gt;programTier&lt;/TD&gt;&lt;TD width="107.484375px"&gt;programType&lt;/TD&gt;&lt;TD width="160.046875px"&gt;redemptionIndicator&lt;/TD&gt;&lt;TD width="113.203125px"&gt;responseTime&lt;/TD&gt;&lt;TD width="225.296875px"&gt;response_accountAuthorized&lt;/TD&gt;&lt;TD width="110.9375px"&gt;response_accountIdentifier&lt;/TD&gt;&lt;TD width="64.234375px"&gt;response_accountStatus&lt;/TD&gt;&lt;TD width="64.015625px"&gt;response_accountToken&lt;/TD&gt;&lt;TD width="66.71875px"&gt;response_availableBalance_name&lt;/TD&gt;&lt;TD width="78.203125px"&gt;response_availableBalance_pointCount&lt;/TD&gt;&lt;TD width="66.71875px"&gt;response_availableBalance_type&lt;/TD&gt;&lt;TD width="100.8125px"&gt;status&lt;/TD&gt;&lt;TD width="49.40625px"&gt;status.code&lt;/TD&gt;&lt;TD width="82.484375px"&gt;status.message&lt;/TD&gt;&lt;TD width="43.15625px"&gt;tierDescription&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="113.65625px"&gt;Token2&lt;/TD&gt;&lt;TD width="286.3125px"&gt;3722494&lt;/TD&gt;&lt;TD width="275.640625px"&gt;ACTIVE&lt;/TD&gt;&lt;TD width="271.96875px"&gt;Token1&lt;/TD&gt;&lt;TD width="207.578125px"&gt;true&lt;/TD&gt;&lt;TD width="226.515625px"&gt;WEB&lt;/TD&gt;&lt;TD width="212.359375px"&gt;en-US&lt;/TD&gt;&lt;TD width="358.765625px"&gt;14&lt;/TD&gt;&lt;TD width="225.1875px"&gt;true&lt;/TD&gt;&lt;TD width="329.328125px"&gt;Token1&lt;/TD&gt;&lt;TD width="262.171875px"&gt;Product1&lt;/TD&gt;&lt;TD width="258.1875px"&gt;Tier1&lt;/TD&gt;&lt;TD width="265.796875px"&gt;Program1&lt;/TD&gt;&lt;TD width="303.546875px"&gt;ACTIVE&lt;/TD&gt;&lt;TD width="224.578125px"&gt;POINTS&lt;/TD&gt;&lt;TD width="162.53125px"&gt;3722494&lt;/TD&gt;&lt;TD width="180.703125px"&gt;91115&lt;/TD&gt;&lt;TD width="153.65625px"&gt;true&lt;/TD&gt;&lt;TD width="153.0625px"&gt;PR&lt;/TD&gt;&lt;TD width="137.0625px"&gt;Function.v1/3.5.0&lt;/TD&gt;&lt;TD width="88.375px"&gt;200&lt;/TD&gt;&lt;TD width="61.453125px"&gt;true&lt;/TD&gt;&lt;TD width="54.046875px"&gt;en-US&lt;/TD&gt;&lt;TD width="66.875px"&gt;false&lt;/TD&gt;&lt;TD width="193.4375px"&gt;Product2&lt;/TD&gt;&lt;TD width="110.5px"&gt;Code1&lt;/TD&gt;&lt;TD width="99.890625px"&gt;Tier1&lt;/TD&gt;&lt;TD width="107.484375px"&gt;Program1&lt;/TD&gt;&lt;TD width="160.046875px"&gt;true&lt;/TD&gt;&lt;TD width="113.203125px"&gt;15&lt;/TD&gt;&lt;TD width="225.296875px"&gt;true&lt;/TD&gt;&lt;TD width="110.9375px"&gt;1M06093364&lt;/TD&gt;&lt;TD width="64.234375px"&gt;ACTIVE&lt;/TD&gt;&lt;TD width="64.015625px"&gt;Token1&lt;/TD&gt;&lt;TD width="66.71875px"&gt;POINTS&lt;/TD&gt;&lt;TD width="78.203125px"&gt;3722494&lt;/TD&gt;&lt;TD width="66.71875px"&gt;POINTS&lt;/TD&gt;&lt;TD width="100.8125px"&gt;ACTIVE&lt;/TD&gt;&lt;TD width="49.40625px"&gt;0000&lt;/TD&gt;&lt;TD width="82.484375px"&gt;SUCCESS&lt;/TD&gt;&lt;TD width="43.15625px"&gt;Tier First&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="113.65625px"&gt;Token3&lt;/TD&gt;&lt;TD width="286.3125px"&gt;3722494&lt;/TD&gt;&lt;TD width="275.640625px"&gt;ACTIVE&lt;/TD&gt;&lt;TD width="271.96875px"&gt;Token1&lt;/TD&gt;&lt;TD width="207.578125px"&gt;true&lt;/TD&gt;&lt;TD width="226.515625px"&gt;WEB&lt;/TD&gt;&lt;TD width="212.359375px"&gt;en-US&lt;/TD&gt;&lt;TD width="358.765625px"&gt;14&lt;/TD&gt;&lt;TD width="225.1875px"&gt;true&lt;/TD&gt;&lt;TD width="329.328125px"&gt;Token1&lt;/TD&gt;&lt;TD width="262.171875px"&gt;Product1&lt;/TD&gt;&lt;TD width="258.1875px"&gt;Tier1&lt;/TD&gt;&lt;TD width="265.796875px"&gt;Program1&lt;/TD&gt;&lt;TD width="303.546875px"&gt;ACTIVE&lt;/TD&gt;&lt;TD width="224.578125px"&gt;POINTS&lt;/TD&gt;&lt;TD width="162.53125px"&gt;3722494&lt;/TD&gt;&lt;TD width="180.703125px"&gt;91016&lt;/TD&gt;&lt;TD width="153.65625px"&gt;true&lt;/TD&gt;&lt;TD width="153.0625px"&gt;PR&lt;/TD&gt;&lt;TD width="137.0625px"&gt;Function.v1/3.5.0&lt;/TD&gt;&lt;TD width="88.375px"&gt;200&lt;/TD&gt;&lt;TD width="61.453125px"&gt;true&lt;/TD&gt;&lt;TD width="54.046875px"&gt;en-US&lt;/TD&gt;&lt;TD width="66.875px"&gt;false&lt;/TD&gt;&lt;TD width="193.4375px"&gt;Product3&lt;/TD&gt;&lt;TD width="110.5px"&gt;Code1&lt;/TD&gt;&lt;TD width="99.890625px"&gt;Tier1&lt;/TD&gt;&lt;TD width="107.484375px"&gt;Program1&lt;/TD&gt;&lt;TD width="160.046875px"&gt;true&lt;/TD&gt;&lt;TD width="113.203125px"&gt;15&lt;/TD&gt;&lt;TD width="225.296875px"&gt;true&lt;/TD&gt;&lt;TD width="110.9375px"&gt;1M06093364&lt;/TD&gt;&lt;TD width="64.234375px"&gt;ACTIVE&lt;/TD&gt;&lt;TD width="64.015625px"&gt;Token1&lt;/TD&gt;&lt;TD width="66.71875px"&gt;POINTS&lt;/TD&gt;&lt;TD width="78.203125px"&gt;3722494&lt;/TD&gt;&lt;TD width="66.71875px"&gt;POINTS&lt;/TD&gt;&lt;TD width="100.8125px"&gt;CANCELLED&lt;/TD&gt;&lt;TD width="49.40625px"&gt;0000&lt;/TD&gt;&lt;TD width="82.484375px"&gt;SUCCESS&lt;/TD&gt;&lt;TD width="43.15625px"&gt;Tier First&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This is an emulation that you can play with and compare with real data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval _raw = "{
  \"functionAddress\":\"Function.v1/3.5.0\",
  \"responseTime\":15,
  \"httpStatus\":200,
  \"additionalParameters\":{
    \"locale\":\"en-US\",
    \"channel\":\"WEB\",
    \"accountToken\":\"Token1\",
    \"productType\":\"Product1\",
    \"primaryAccountToken\":\"Token1\",
    \"programTier\":\"Tier1\",
    \"programType\":\"Program1\",
    \"accountBalance\":\"3722494\",
    \"accountStatus\":\"ACTIVE\",
    \"relationShipStatus\":\"ACTIVE\",
    \"numberOfLinkedAccounts\":14,
    \"basic\":true,
    \"primary\":true
  },
  \"response\":[
    {
      \"status\":{
        \"code\":\"0000\",
        \"message\":\"SUCCESS\"
      },
      \"accountToken\":\"Token1\",
      \"accountIdentifier\":\"1M06093364\",
      \"accountStatus\":\"ACTIVE\",
      \"programCode\":\"Code1\",
      \"programTier\":\"Tier1\",
      \"tierDescription\":\"Tier First\",
      \"programType\":\"Program1\",
      \"currentBalance\":{
        \"currencyType\":\"POINTS\",
        \"value\":3722494
      },
      \"accountBalance\":{
        \"availableBalance\":[
          {
            \"type\":\"POINTS\",
            \"name\":\"POINTS\",
            \"pointCount\":\"3722494\"
          }
        ]
      },
      \"enrollmentIndicator\":true,
      \"redemptionIndicator\":true,
      \"accountAuthorized\":true,
      \"featureSetIdentifier\":\"PR\",
      \"relationships\":[
        {
          \"accountToken\":\"Token2\",
          \"primary\":false,
          \"status\":\"ACTIVE\",
          \"displayAccountNumber\":\"91115\",
          \"productRelationshipType\":\"Product2\"
        },
        {
          \"accountToken\":\"Token3\",
          \"primary\":false,
          \"status\":\"CANCELLED\",
          \"displayAccountNumber\":\"91016\",
          \"productRelationshipType\":\"Product3\"
        }

      ],
      \"locale\":\"en-US\",
      \"isBasic\":true
    }
  ]
}"
| spath
``` data emulation above ```&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2023 07:14:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-nested-JSON-fields-and-array-from-Splunk-data/m-p/647717#M224163</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-06-21T07:14:02Z</dc:date>
    </item>
  </channel>
</rss>

