<?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: Extract names and ids within array in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711083#M240101</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/270623"&gt;@Tajuddin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;at first, to share something like log samples or code you can use the "Insert/Edit code sample" button.&lt;/P&gt;&lt;P&gt;Anyway, this seems to be a json log, did you tried to use INDEXED_EXTRACTION=JSON or spath command?&lt;/P&gt;&lt;P&gt;Otherwise, it's possible to use a regex.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 10 Feb 2025 07:15:36 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2025-02-10T07:15:36Z</dc:date>
    <item>
      <title>Extract names and ids within array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711080#M240099</link>
      <description>&lt;P&gt;I have the following log from splunk where i want to extract names and their respective ids. Please help with the splunk search to print the room names along with dedup ids.&lt;BR /&gt;&lt;BR /&gt;Log Event&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TIME:10/Feb/2025:03:08:17 -0800 TYPE:INFO APP_NAME:ROOM_LOOKUP_JOBS APP_BUILD_VERSION:NOT_DEFINED CLIENT_IP:100.102.16.183 CLIENT_USER_AGENT:Unknown Browser CLIENT_OS_N_DEVICE:Unknown OS Unknow Devices CLIENT_REQUEST_METHOD:GET CLIENT_REQUEST_URI:/supporting-apps/room-lookup-job/index.php CLIENT_REQUEST_TYPE:HttpRequest CLIENT_REQUEST_CONTENT_SIZE:0 SERVER_HOST_NAME:roomlookupjob-prod.us-west-2i.app.apple.com SERVER_CONTAINER_ID:roomlookupjob-prod-5d96c45c64-w4q79 REQUEST_UNIQUE_ID:Z6neG-5vAofNnSWuA5msAQAAAAA MESSAGE="Rooms successfully updated for building - IL01: [{\"name\":\"Chiaroscuro (B277) [AVCN] (3) {R} IL01 2nd\",\"id\":\"6C30AF02-5900-480C-873F-8B0763DE95F8\"},{\"name\":\"2-Pop (N221) [AVCN] (8) {R} IL01 2nd\",\"id\":\"7853CB27-A083-454F-90A6-006854396AD1\"},{\"name\":\"Bonk (B380) [AVCN] (3) {R} IL01 3rd\",\"id\":\"88AF6D48-F930-4A98-9171-BE1FAAF0E36D\"},{\"name\":\"Montage (D203) [AVCN] (7) {R} IL01 2nd\",\"id\":\"29C44E4D-8628-4815-9AB8-CF49682A9EDC\"},{\"name\":\"Cougar - Interview Room Only (B138) (4) {R} IL01 1st\",\"id\":\"D1F40F0F-E40D-46B3-BD62-2C9A054E9E70\"},{\"name\":\"Iceman - Interview Room Only (B140) (3) {R} IL01 1st\",\"id\":\"38348FD5-021A-466E-A860-0A45CA9CD18F\"},{\"name\":\"Merlin - Interview Room Only (B136) (2) {R} IL01 1st\",\"id\":\"51211C55-94EA-4B38-97B6-2EB20369FDAF\"},{\"name\":\"Viper - Interview Room Only (B134) (10) {R} IL01 1st\",\"id\":\"940E9844-49BF-4B4E-B114-A2D734203C37\"},{\"name\":\"Maverick - Interview Room Only (B142) (4) {R} IL01 1st\",\"id\":\"6D29660F-09C3-4634-8DE5-0ECFAA5639DB\"},{\"name\":\"Vignette (R278) [AVCN] (12) {R} IL01 2nd\",\"id\":\"00265678-8775-4E95-A7CA-8454AD35C4A4\"},{\"name\":\"Broom Wagon (A317) [AVCN] (14) {R} IL01 3rd\",\"id\":\"1D1EB626-C5D2-4289-B5DA-A7F6EAA79AE8\"},{\"name\":\"Jump Cut (D211) [AVCN] (22) {R} IL01 2nd\",\"id\":\"66FF42BA-3ED6-48E6-886D-08CE18124110\"},{\"name\":\"{M} The Roundhouse (P404) (6) {R} IL01 4th\",\"id\":\"2477B40A-97BF-E2C7-4908-EF5D172D5DD3\"},{\"name\":\"Corncob (S323) [AVCN] (7) {R} IL01 3rd\",\"id\":\"F01706E7-F19B-3035-CEF4-4D13FC792B0E\"},{\"name\":\"Rouleur (Q311) [AVCN] (14) {R} IL01 3rd\",\"id\":\"D96D16CE-557E-90A0-AF65-9FCAAE406659\"},{\"name\":\"Field Sprint (S341) [AVCN] (13) {R} IL01 3rd\",\"id\":\"DA59EAC2-8491-3EE2-9B78-A54E5A3FE704\"},{\"name\":\"{M} Storyboard (C218) [AVCN] (27) {R} IL01 2nd\",\"id\":\"45C4588D-0CB5-D035-5C2E-517477B1D7CB\"},{\"name\":\"Zoetrope (S241) [AVCN] (8) {R} IL01 2nd\",\"id\":\"58750290-4C79-9AFB-B277-BDE5A219D0E5\"},{\"name\":\"Sizzle Reel (P248) [AVCN] (8) {R} IL01 2nd\",\"id\":\"DF8004E6-25B8-3B18-794D-253D83FE1279\"},{\"name\":\"Rough Cut (N213) [AVCN] (7) {R} IL01 2nd\",\"id\":\"A3792CEC-BF73-F207-DB06-3884D1042C80\"}]"&lt;/LI-CODE&gt;&lt;P&gt;&lt;FONT color="#FF00FF"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/FONT&gt;index=roomlookup_prod | search "Rooms successfully updated for building - IL01"&lt;BR /&gt;&lt;BR /&gt;Expected results:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;P&gt;name&lt;/P&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;id&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;FONT color="#FF00FF"&gt;&lt;SPAN class=""&gt;Chiaroscuro&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN class=""&gt;B277&lt;/SPAN&gt;&lt;SPAN&gt;) [&lt;/SPAN&gt;&lt;SPAN class=""&gt;AVCN&lt;/SPAN&gt;&lt;SPAN&gt;] (&lt;/SPAN&gt;&lt;SPAN class=""&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;SPAN class=""&gt;R&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN class=""&gt;IL01&lt;/SPAN&gt; &lt;SPAN class=""&gt;2nd&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&lt;FONT color="#FF00FF"&gt;&lt;SPAN class=""&gt;6C30AF02-5900-480C-873F-8B0763DE95F8&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;FONT color="#FF00FF"&gt;&lt;SPAN class=""&gt;2-Pop&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN class=""&gt;N221&lt;/SPAN&gt;&lt;SPAN&gt;) [&lt;/SPAN&gt;&lt;SPAN class=""&gt;AVCN&lt;/SPAN&gt;&lt;SPAN&gt;] (&lt;/SPAN&gt;&lt;SPAN class=""&gt;8&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;SPAN class=""&gt;R&lt;/SPAN&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN class=""&gt;IL01&lt;/SPAN&gt; &lt;SPAN class=""&gt;2nd&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;&amp;nbsp;&lt;FONT color="#FF00FF"&gt;&lt;SPAN class=""&gt;7853CB27-A083-454F-90A6-006854396AD1&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;and so on..&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 11:14:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711080#M240099</guid>
      <dc:creator>Tajuddin</dc:creator>
      <dc:date>2025-02-10T11:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extract names and ids within array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711081#M240100</link>
      <description>&lt;P&gt;Please note that there is actually &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt; in place of&amp;nbsp;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;. When i posted, it automatically converted to emoji.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 07:05:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711081#M240100</guid>
      <dc:creator>Tajuddin</dc:creator>
      <dc:date>2025-02-10T07:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extract names and ids within array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711083#M240101</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/270623"&gt;@Tajuddin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;at first, to share something like log samples or code you can use the "Insert/Edit code sample" button.&lt;/P&gt;&lt;P&gt;Anyway, this seems to be a json log, did you tried to use INDEXED_EXTRACTION=JSON or spath command?&lt;/P&gt;&lt;P&gt;Otherwise, it's possible to use a regex.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 07:15:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711083#M240101</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-02-10T07:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extract names and ids within array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711118#M240109</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;I tried both using spath and rex commands. Both haven’t worked. Using spath I didn’t get any stats. With rex, it shown 1317 stats but in results it is completely empty or you can say it created an empty table.&amp;nbsp;&lt;BR /&gt;please give me a full conmand which you feel is gonna work.&lt;/P&gt;&lt;P&gt;index and search string has been already provided.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 10:30:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711118#M240109</guid>
      <dc:creator>Tajuddin</dc:creator>
      <dc:date>2025-02-10T10:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract names and ids within array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711131#M240110</link>
      <description>&lt;P&gt;To be honest, this log looks like a mess - it appears to be trying to use JSON but is failing - if you have any influence over the app developers, try to get them to fix their log format.&lt;/P&gt;&lt;P&gt;Failing that, you could try something really messy like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "MESSAGE=\"Rooms successfully updated for building - IL01: (?&amp;lt;msg&amp;gt;.+?)(?&amp;lt;!\\\\)\""
| eval msg="{\"il01\":\"".msg."\"}"
| spath input=msg
| spath input=il01 {} output=array
| mvexpand array
| spath input=array
| table name id&lt;/LI-CODE&gt;&lt;P&gt;This assumes that "Rooms successfully updated for building - IL01" is a static string, if it isn't, you might need to replace some or all of this with the corresponding regular expression.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 11:11:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711131#M240110</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-02-10T11:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Extract names and ids within array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711132#M240111</link>
      <description>&lt;P&gt;Excellent, This worked. Thanks a lot for your efforts.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 11:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711132#M240111</guid>
      <dc:creator>Tajuddin</dc:creator>
      <dc:date>2025-02-10T11:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Extract names and ids within array</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711137#M240112</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/270623"&gt;@Tajuddin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 11:36:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-names-and-ids-within-array/m-p/711137#M240112</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-02-10T11:36:58Z</dc:date>
    </item>
  </channel>
</rss>

