<?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 Create table from nested array of json objects that includes lookup value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Create-table-from-nested-array-of-json-objects-that-includes/m-p/749510#M242158</link>
    <description>&lt;P&gt;I have an event that looks as follows:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "app_name": "my_app",
    "audit_details": {
        "audit": {
            "responseContentLength": "-1",
            "name": "app_name",
            "details": {
                "detail": [{
                        "messageId": "-4",
                        "time": "1752065281146",
                        "ordinal": "0"
                    }, {
                        "messageId": "7103",
                        "time": "1752065281146",
                        "ordinal": "1"
                    }, {
                        "messageId": "7101",
                        "time": "1752065281146",
                        "ordinal": "2"
                    }
                ]
            }
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;I want to create a table that includes a row for each detail record that includes the messageId, time and ordinal, but also a messageIdDescription that is retrieved from a lookup similar to as follows:&lt;BR /&gt;&lt;BR /&gt;lookup Table_MessageId message_Id as messageId OUTPUT definition as messageIdDescription&lt;BR /&gt;&lt;BR /&gt;the Table_MessageId has three columns - message_Id, definition, audit_Level&lt;BR /&gt;&lt;BR /&gt;Any pointers are appreciated.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jul 2025 14:50:40 GMT</pubDate>
    <dc:creator>tomporterfield</dc:creator>
    <dc:date>2025-07-09T14:50:40Z</dc:date>
    <item>
      <title>Create table from nested array of json objects that includes lookup value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-table-from-nested-array-of-json-objects-that-includes/m-p/749510#M242158</link>
      <description>&lt;P&gt;I have an event that looks as follows:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
    "app_name": "my_app",
    "audit_details": {
        "audit": {
            "responseContentLength": "-1",
            "name": "app_name",
            "details": {
                "detail": [{
                        "messageId": "-4",
                        "time": "1752065281146",
                        "ordinal": "0"
                    }, {
                        "messageId": "7103",
                        "time": "1752065281146",
                        "ordinal": "1"
                    }, {
                        "messageId": "7101",
                        "time": "1752065281146",
                        "ordinal": "2"
                    }
                ]
            }
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;I want to create a table that includes a row for each detail record that includes the messageId, time and ordinal, but also a messageIdDescription that is retrieved from a lookup similar to as follows:&lt;BR /&gt;&lt;BR /&gt;lookup Table_MessageId message_Id as messageId OUTPUT definition as messageIdDescription&lt;BR /&gt;&lt;BR /&gt;the Table_MessageId has three columns - message_Id, definition, audit_Level&lt;BR /&gt;&lt;BR /&gt;Any pointers are appreciated.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 14:50:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-table-from-nested-array-of-json-objects-that-includes/m-p/749510#M242158</guid>
      <dc:creator>tomporterfield</dc:creator>
      <dc:date>2025-07-09T14:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create table from nested array of json objects that includes lookup value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-table-from-nested-array-of-json-objects-that-includes/m-p/749512#M242160</link>
      <description>&lt;P&gt;Use spath and mvexpand&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| spath path=audit_details.audit.details.detail{}
| mvexpand audit_details.audit.details.detail{}
| spath input=audit_details.audit.details.detail{}
| fields - audit_details.audit.details.detail{}*&lt;/LI-CODE&gt;&lt;P&gt;Your would give&lt;/P&gt;&lt;TABLE width="743px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;app_name&lt;/TD&gt;&lt;TD&gt;audit_details.audit.name&lt;/TD&gt;&lt;TD&gt;audit_details.audit.responseContentLength&lt;/TD&gt;&lt;TD&gt;messageId&lt;/TD&gt;&lt;TD&gt;ordinal&lt;/TD&gt;&lt;TD&gt;time&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="69.40625px"&gt;my_app&lt;/TD&gt;&lt;TD width="155.703125px"&gt;app_name&lt;/TD&gt;&lt;TD width="268px"&gt;-1&lt;/TD&gt;&lt;TD width="68.921875px"&gt;-4&lt;/TD&gt;&lt;TD width="43.984375px"&gt;0&lt;/TD&gt;&lt;TD width="136px"&gt;1752065281146&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="69.40625px"&gt;my_app&lt;/TD&gt;&lt;TD width="155.703125px"&gt;app_name&lt;/TD&gt;&lt;TD width="268px"&gt;-1&lt;/TD&gt;&lt;TD width="68.921875px"&gt;7103&lt;/TD&gt;&lt;TD width="43.984375px"&gt;1&lt;/TD&gt;&lt;TD width="136px"&gt;1752065281146&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="69.40625px"&gt;my_app&lt;/TD&gt;&lt;TD width="155.703125px"&gt;app_name&lt;/TD&gt;&lt;TD width="268px"&gt;-1&lt;/TD&gt;&lt;TD width="68.921875px"&gt;7101&lt;/TD&gt;&lt;TD width="43.984375px"&gt;2&lt;/TD&gt;&lt;TD width="136px"&gt;1752065281146&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Here is an emulation for you to play with and compare with real data&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| fields - _time
| eval _raw = "{
    \"app_name\": \"my_app\",
    \"audit_details\": {
        \"audit\": {
            \"responseContentLength\": \"-1\",
            \"name\": \"app_name\",
            \"details\": {
                \"detail\": [{
                        \"messageId\": \"-4\",
                        \"time\": \"1752065281146\",
                        \"ordinal\": \"0\"
                    }, {
                        \"messageId\": \"7103\",
                        \"time\": \"1752065281146\",
                        \"ordinal\": \"1\"
                    }, {
                        \"messageId\": \"7101\",
                        \"time\": \"1752065281146\",
                        \"ordinal\": \"2\"
                    }
                ]
            }
        }
    }

}"
| spath
``` data emulation above ```&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 09 Jul 2025 16:25:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-table-from-nested-array-of-json-objects-that-includes/m-p/749512#M242160</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2025-07-09T16:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create table from nested array of json objects that includes lookup value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-table-from-nested-array-of-json-objects-that-includes/m-p/749528#M242164</link>
      <description>&lt;P&gt;Thanks, let me give that a go in the overall solution, but it looks very promising.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jul 2025 19:22:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-table-from-nested-array-of-json-objects-that-includes/m-p/749528#M242164</guid>
      <dc:creator>tomporterfield</dc:creator>
      <dc:date>2025-07-09T19:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Create table from nested array of json objects that includes lookup value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-table-from-nested-array-of-json-objects-that-includes/m-p/749726#M242220</link>
      <description>&lt;P&gt;I was able to successfully get this working with the guidance, thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jul 2025 11:30:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-table-from-nested-array-of-json-objects-that-includes/m-p/749726#M242220</guid>
      <dc:creator>tomporterfield</dc:creator>
      <dc:date>2025-07-14T11:30:46Z</dc:date>
    </item>
  </channel>
</rss>

