<?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 to write query-rex to get table inside table data? in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-write-query-rex-to-get-table-inside-table-data/m-p/491225#M8343</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw ="\"studentInfo\": {
\"name\": \"Apple\",
\"id\": \"57\",
\"batch\": \"2006\",
\"subjects\": {
\"subject1\": \"English\"
}
}"
| rex max_match=0 "\"(?&amp;lt;fieldname&amp;gt;.*?)\": \"(?&amp;lt;fieldvalue&amp;gt;.*?)\""
| eval _raw=mvzip(fieldname,fieldvalue,"=")
| kv
| fields - _* field*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 13 Mar 2020 11:10:48 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-03-13T11:10:48Z</dc:date>
    <item>
      <title>How to write query-rex to get table inside table data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-write-query-rex-to-get-table-inside-table-data/m-p/491222#M8340</link>
      <description>&lt;P&gt;How to write a rex query for table inside table for the below case&lt;/P&gt;

&lt;P&gt;"studentInfo": {&lt;BR /&gt;
    "name": "Apple",&lt;BR /&gt;
    "id": "57",&lt;BR /&gt;
    "batch": "2006",&lt;BR /&gt;
    "subjects": {&lt;BR /&gt;
      "subject1": "English"&lt;BR /&gt;
    }&lt;BR /&gt;
  }&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;index=schoolIndex sourcetype=dev  studentInfo | rex field=_raw "\"contentversions\":(?.*)}+" | spath input=message | table name id subjects&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 11:37:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-write-query-rex-to-get-table-inside-table-data/m-p/491222#M8340</guid>
      <dc:creator>rashhvarikuti</dc:creator>
      <dc:date>2020-03-12T11:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to write query-rex to get table inside table data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-write-query-rex-to-get-table-inside-table-data/m-p/491223#M8341</link>
      <description>&lt;P&gt;What do you want to &lt;CODE&gt;rex&lt;/CODE&gt; out?&lt;/P&gt;

&lt;P&gt;It's JSON - and &lt;EM&gt;should&lt;/EM&gt; be coming at least &lt;EM&gt;mostly&lt;/EM&gt; preparsed into Splunk&lt;/P&gt;

&lt;P&gt;Are you sure something like the following won't work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=schoolindex sourcetype=dev studentInfo.subjects{}=*
| stats values(studentInfo.subjects) by studentInfo.id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Mar 2020 13:36:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-write-query-rex-to-get-table-inside-table-data/m-p/491223#M8341</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2020-03-12T13:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to write query-rex to get table inside table data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-write-query-rex-to-get-table-inside-table-data/m-p/491224#M8342</link>
      <description>&lt;P&gt;Yes, I tried similar way but it's getting no results(but results are there I tried "index= schoolindex sourcetype=dev jobId=8e62-71c72ccb3aec studentInfo" and getting data):&lt;/P&gt;

&lt;P&gt;index= schoolindex sourcetype=dev jobId=8e62-71c72ccb3aec studentInfo. subjects{}=*&lt;BR /&gt;
 | stats values(studentInfo. subjects) by studentInfo.id &lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 16:39:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-write-query-rex-to-get-table-inside-table-data/m-p/491224#M8342</guid>
      <dc:creator>rashhvarikuti</dc:creator>
      <dc:date>2020-03-12T16:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to write query-rex to get table inside table data?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-write-query-rex-to-get-table-inside-table-data/m-p/491225#M8343</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw ="\"studentInfo\": {
\"name\": \"Apple\",
\"id\": \"57\",
\"batch\": \"2006\",
\"subjects\": {
\"subject1\": \"English\"
}
}"
| rex max_match=0 "\"(?&amp;lt;fieldname&amp;gt;.*?)\": \"(?&amp;lt;fieldvalue&amp;gt;.*?)\""
| eval _raw=mvzip(fieldname,fieldvalue,"=")
| kv
| fields - _* field*
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Mar 2020 11:10:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/How-to-write-query-rex-to-get-table-inside-table-data/m-p/491225#M8343</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-13T11:10:48Z</dc:date>
    </item>
  </channel>
</rss>

