<?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: Searching nested JSON to create audit dashboard in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495955#M138231</link>
    <description>&lt;P&gt;Hi - have you tried leveraging the &lt;CODE&gt;spath&lt;/CODE&gt; command? &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Spath" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Spath&lt;/A&gt; it's used pretty exclusively for this purpose. Take a look at the example below:&lt;/P&gt;

&lt;P&gt;{code}&lt;BR /&gt;
| makeresults count=1&lt;BR /&gt;
| eval _raw="{\"Results\":[{\"Username\":\"Org FinAdmin\",\"EntityName\":\"EPMS.Domain.Entities.Account\",\"DateTime\":\"2019-12-02T19:03:48.1452368Z\",\"EntityID\":\"200000032\",\"ParentEntity\":\"\",\"ParentEntityID\":\"0\",\"ChangeType\":\"Modified\",\"ChangeDetails\":[{\"FieldName\":\"AccountGroupId\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"AccountTypeId\",\"OldValue\":\"132\",\"NewValue\":\"132\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDue\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate120\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"}"&lt;BR /&gt;
| spath input=_raw&lt;BR /&gt;
{code}&lt;/P&gt;

&lt;P&gt;In this example, I took most of your JSON object, escaped the quotes so I can query it, made a result to make Splunk happy, and then just ran the &lt;CODE&gt;spath&lt;/CODE&gt; command specifying the input to be the entire object. You can also specify the output, and a specific path based on the docs I linked above. The command resulted in a row of each of your objects parsed into multivalue fields reflecting what I think you're looking for. &lt;/P&gt;

&lt;P&gt;If you think specific information should be "tied together" (as in some multivalue fields should actually be single values while maintaining the single values of the rest of the entries), I would suggest exploring the &lt;CODE&gt;mvzip&lt;/CODE&gt; function on the &lt;CODE&gt;eval&lt;/CODE&gt; command &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/MultivalueEvalFunctions#mvzip.28X.2CY.2C.22Z.22.29" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/MultivalueEvalFunctions#mvzip.28X.2CY.2C.22Z.22.29&lt;/A&gt; along with the &lt;CODE&gt;mvexpand&lt;/CODE&gt; command &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/Mvexpand" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/Mvexpand&lt;/A&gt; to zip together those single values and then expand them. &lt;/P&gt;

&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 03:13:36 GMT</pubDate>
    <dc:creator>aberkow</dc:creator>
    <dc:date>2020-09-30T03:13:36Z</dc:date>
    <item>
      <title>Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495954#M138230</link>
      <description>&lt;P&gt;I have some test JSON data that I am having trouble searching for. &lt;BR /&gt;
I need to create some Audit dashboards around this data and trying to find a way to search the field names has been pretty difficult. Any help would be appreciated.&lt;/P&gt;

&lt;P&gt;I would like to be able to search something like this:  &lt;CODE&gt;| search PatientName= and addressLine1=&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Here is one event that I have in splunk fully opened up:&lt;BR /&gt;
&lt;CODE&gt;{"Results":[{"Username":"Org FinAdmin","EntityName":"EPMS.Domain.Entities.Account","DateTime":"2019-12-02T19:03:48.1452368Z","EntityID":"200000032","ParentEntity":"","ParentEntityID":"0","ChangeType":"Modified","ChangeDetails":[{"FieldName":"AccountGroupId","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"AccountTypeId","OldValue":"132","NewValue":"132","$type":"AuditChangeDetail"},{"FieldName":"BalanceDue","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"BalanceDueLate120","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"BalanceDueLate150","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"BalanceDueLate30","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"BalanceDueLate60","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"BalanceDueLate90","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"BalanceDueLateMax","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"CreatedByProgram","OldValue":"epmsApplication","NewValue":"epmsApplication","$type":"AuditChangeDetail"},{"FieldName":"CreatedByUser","OldValue":"Org FinAdmin","NewValue":"Org FinAdmin","$type":"AuditChangeDetail"},{"FieldName":"CreatedDateTime","OldValue":"12/2/2019 7:03:47 PM","NewValue":"12/2/2019 7:03:47 PM","$type":"AuditChangeDetail"},{"FieldName":"FinancialClassId","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"GuarantorId","OldValue":"21737061","NewValue":"21737061","$type":"AuditChangeDetail"},{"FieldName":"GuarantorName","OldValue":"","NewValue":"","$type":"AuditChangeDetail"},{"FieldName":"IsAssessFinanceCharge","OldValue":" ","NewValue":" ","$type":"AuditChangeDetail"},{"FieldName":"IsNewAccount","OldValue":" ","NewValue":" ","$type":"AuditChangeDetail"},{"FieldName":"IsPatient","OldValue":"True","NewValue":"True","$type":"AuditChangeDetail"},{"FieldName":"IsSendNewsLetter","OldValue":" ","NewValue":" ","$type":"AuditChangeDetail"},{"FieldName":"LastChargeDate","OldValue":"1/1/1940 12:00:00 AM","NewValue":"1/1/1940 12:00:00 AM","$type":"AuditChangeDetail"},{"FieldName":"LastInsurancePayment","OldValue":"1/1/1940 12:00:00 AM","NewValue":"1/1/1940 12:00:00 AM","$type":"AuditChangeDetail"},{"FieldName":"LastPaymentDate","OldValue":"1/1/1940 12:00:00 AM","NewValue":"1/1/1940 12:00:00 AM","$type":"AuditChangeDetail"},{"FieldName":"LastStatementDate","OldValue":"1/1/1940 12:00:00 AM","NewValue":"1/1/1940 12:00:00 AM","$type":"AuditChangeDetail"},{"FieldName":"MigratedOn","OldValue":null,"NewValue":null,"$type":"AuditChangeDetail"},{"FieldName":"ModifiedByProgram","OldValue":"epmsApplication","NewValue":"epmsApplication","$type":"AuditChangeDetail"},{"FieldName":"ModifiedByUser","OldValue":"Org FinAdmin","NewValue":"Org FinAdmin","$type":"AuditChangeDetail"},{"FieldName":"ModifiedDateTime","OldValue":"12/2/2019 7:03:47 PM","NewValue":"12/2/2019 7:03:48 PM","$type":"AuditChangeDetail"},{"FieldName":"MonthToDateCharges","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"MonthToDateDirectPayments","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"MonthToDatePayments","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"NoteChanged","OldValue":"1/1/1940 12:00:00 AM","NewValue":"1/1/1940 12:00:00 AM","$type":"AuditChangeDetail"},{"FieldName":"RecordNotesId","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"RecordStatus","OldValue":" ","NewValue":" ","$type":"AuditChangeDetail"},{"FieldName":"RecordStatusChangeDate","OldValue":"1/1/1940 12:00:00 AM","NewValue":"1/1/1940 12:00:00 AM","$type":"AuditChangeDetail"},{"FieldName":"ReferenceCodeId","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"ResidenceName","OldValue":"","NewValue":"","$type":"AuditChangeDetail"},{"FieldName":"ResidentPersonCode","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"SeparateStatementId","OldValue":"0","NewValue":"0","$type":"AuditChangeDetail"},{"FieldName":"StatusId","OldValue":"1","NewValue":"1","$type":"AuditChangeDetail"}],"$type":"Auditable"}],"$type":"AuditResults"}&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 21:54:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495954#M138230</guid>
      <dc:creator>Tylerdygert</dc:creator>
      <dc:date>2019-12-02T21:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495955#M138231</link>
      <description>&lt;P&gt;Hi - have you tried leveraging the &lt;CODE&gt;spath&lt;/CODE&gt; command? &lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Spath" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Spath&lt;/A&gt; it's used pretty exclusively for this purpose. Take a look at the example below:&lt;/P&gt;

&lt;P&gt;{code}&lt;BR /&gt;
| makeresults count=1&lt;BR /&gt;
| eval _raw="{\"Results\":[{\"Username\":\"Org FinAdmin\",\"EntityName\":\"EPMS.Domain.Entities.Account\",\"DateTime\":\"2019-12-02T19:03:48.1452368Z\",\"EntityID\":\"200000032\",\"ParentEntity\":\"\",\"ParentEntityID\":\"0\",\"ChangeType\":\"Modified\",\"ChangeDetails\":[{\"FieldName\":\"AccountGroupId\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"AccountTypeId\",\"OldValue\":\"132\",\"NewValue\":\"132\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDue\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate120\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"}"&lt;BR /&gt;
| spath input=_raw&lt;BR /&gt;
{code}&lt;/P&gt;

&lt;P&gt;In this example, I took most of your JSON object, escaped the quotes so I can query it, made a result to make Splunk happy, and then just ran the &lt;CODE&gt;spath&lt;/CODE&gt; command specifying the input to be the entire object. You can also specify the output, and a specific path based on the docs I linked above. The command resulted in a row of each of your objects parsed into multivalue fields reflecting what I think you're looking for. &lt;/P&gt;

&lt;P&gt;If you think specific information should be "tied together" (as in some multivalue fields should actually be single values while maintaining the single values of the rest of the entries), I would suggest exploring the &lt;CODE&gt;mvzip&lt;/CODE&gt; function on the &lt;CODE&gt;eval&lt;/CODE&gt; command &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/MultivalueEvalFunctions#mvzip.28X.2CY.2C.22Z.22.29" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/MultivalueEvalFunctions#mvzip.28X.2CY.2C.22Z.22.29&lt;/A&gt; along with the &lt;CODE&gt;mvexpand&lt;/CODE&gt; command &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/Mvexpand" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.0.0/SearchReference/Mvexpand&lt;/A&gt; to zip together those single values and then expand them. &lt;/P&gt;

&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:13:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495955#M138231</guid>
      <dc:creator>aberkow</dc:creator>
      <dc:date>2020-09-30T03:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495956#M138232</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="{\"Results\":[{\"Username\":\"Org FinAdmin\",\"EntityName\":\"EPMS.Domain.Entities.Account\",\"DateTime\":\"2019-12-02T19:03:48.1452368Z\",\"EntityID\":\"200000032\",\"ParentEntity\":\"\",\"ParentEntityID\":\"0\",\"ChangeType\":\"Modified\",\"ChangeDetails\":[{\"FieldName\":\"AccountGroupId\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"AccountTypeId\",\"OldValue\":\"132\",\"NewValue\":\"132\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDue\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate120\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate150\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate30\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate60\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate90\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLateMax\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"CreatedByProgram\",\"OldValue\":\"epmsApplication\",\"NewValue\":\"epmsApplication\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"CreatedByUser\",\"OldValue\":\"Org FinAdmin\",\"NewValue\":\"Org FinAdmin\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"CreatedDateTime\",\"OldValue\":\"12/2/2019 7:03:47 PM\",\"NewValue\":\"12/2/2019 7:03:47 PM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"FinancialClassId\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"GuarantorId\",\"OldValue\":\"21737061\",\"NewValue\":\"21737061\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"GuarantorName\",\"OldValue\":\"\",\"NewValue\":\"\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"IsAssessFinanceCharge\",\"OldValue\":\" \",\"NewValue\":\" \",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"IsNewAccount\",\"OldValue\":\" \",\"NewValue\":\" \",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"IsPatient\",\"OldValue\":\"True\",\"NewValue\":\"True\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"IsSendNewsLetter\",\"OldValue\":\" \",\"NewValue\":\" \",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"LastChargeDate\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"LastInsurancePayment\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"LastPaymentDate\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"LastStatementDate\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"MigratedOn\",\"OldValue\":null,\"NewValue\":null,\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ModifiedByProgram\",\"OldValue\":\"epmsApplication\",\"NewValue\":\"epmsApplication\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ModifiedByUser\",\"OldValue\":\"Org FinAdmin\",\"NewValue\":\"Org FinAdmin\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ModifiedDateTime\",\"OldValue\":\"12/2/2019 7:03:47 PM\",\"NewValue\":\"12/2/2019 7:03:48 PM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"MonthToDateCharges\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"MonthToDateDirectPayments\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"MonthToDatePayments\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"NoteChanged\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"RecordNotesId\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"RecordStatus\",\"OldValue\":\" \",\"NewValue\":\" \",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"RecordStatusChangeDate\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ReferenceCodeId\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ResidenceName\",\"OldValue\":\"\",\"NewValue\":\"\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ResidentPersonCode\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"SeparateStatementId\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"StatusId\",\"OldValue\":\"1\",\"NewValue\":\"1\",\"$type\":\"AuditChangeDetail\"}],\"$type\":\"Auditable\"}],\"$type\":\"AuditResults\"}" 
| append 
[| makeresults 
| eval _raw="{\"Results\": 
[ {\"Username\":\"foo\",\"EntityName\":\"EPMS.Domain.Entities.Account\",\"DateTime\":\"2019-12-02T20:03:48.1452368Z\",\"EntityID\":\"200000032\",\"ParentEntity\":\"\",\"ParentEntityID\":\"0\",\"ChangeType\":\"Modified\",\"ChangeDetails\": 
    [ {\"FieldName\":\"AccountGroupId\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"AccountTypeId\",\"OldValue\":\"132\",\"NewValue\":\"132\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDue\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate120\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate150\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate30\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate60\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLate90\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"BalanceDueLateMax\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"CreatedByProgram\",\"OldValue\":\"epmsApplication\",\"NewValue\":\"epmsApplication\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"CreatedByUser\",\"OldValue\":\"Org FinAdmin\",\"NewValue\":\"Org FinAdmin\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"CreatedDateTime\",\"OldValue\":\"12/2/2019 7:03:47 PM\",\"NewValue\":\"12/2/2019 7:03:47 PM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"FinancialClassId\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"GuarantorId\",\"OldValue\":\"21737061\",\"NewValue\":\"21737061\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"GuarantorName\",\"OldValue\":\"\",\"NewValue\":\"\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"IsAssessFinanceCharge\",\"OldValue\":\" \",\"NewValue\":\" \",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"IsNewAccount\",\"OldValue\":\" \",\"NewValue\":\" \",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"IsPatient\",\"OldValue\":\"True\",\"NewValue\":\"True\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"IsSendNewsLetter\",\"OldValue\":\" \",\"NewValue\":\" \",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"LastChargeDate\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"LastInsurancePayment\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"LastPaymentDate\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"LastStatementDate\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"MigratedOn\",\"OldValue\":null,\"NewValue\":null,\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ModifiedByProgram\",\"OldValue\":\"epmsApplication\",\"NewValue\":\"epmsApplication\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ModifiedByUser\",\"OldValue\":\"Org FinAdmin\",\"NewValue\":\"Org FinAdmin\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ModifiedDateTime\",\"OldValue\":\"12/2/2019 8:03:47 PM\",\"NewValue\":\"12/2/2019 8:03:48 PM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"MonthToDateCharges\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"MonthToDateDirectPayments\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"MonthToDatePayments\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"NoteChanged\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"RecordNotesId\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"RecordStatus\",\"OldValue\":\" \",\"NewValue\":\" \",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"RecordStatusChangeDate\",\"OldValue\":\"1/1/1940 12:00:00 AM\",\"NewValue\":\"1/1/1940 12:00:00 AM\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ReferenceCodeId\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ResidenceName\",\"OldValue\":\"\",\"NewValue\":\"\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"ResidentPersonCode\",\"OldValue\":\"0\",\"NewValue\":\"0\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"SeparateStatementId\",\"OldValue\":\"0\",\"NewValue\":\"1\",\"$type\":\"AuditChangeDetail\"},{\"FieldName\":\"StatusId\",\"OldValue\":\"1\",\"NewValue\":\"1\",\"$type\":\"AuditChangeDetail\"}],\"$type\":\"Auditable\"}],\"$type\":\"AuditResults\"}"] 
| spath path=Results{}.ChangeDetails{} output=ChangeDetails 
| spath path=Results{}.Username output=Username 
| spath path=Results{}.DateTime output=DateTime 
| mvexpand ChangeDetails 
| spath input=ChangeDetails path=FieldName output=FieldName 
| spath input=ChangeDetails path=OldValue output=OldValue 
| spath input=ChangeDetails path=NewValue output=NewValue 
| table DateTime, Username, FieldName, OldValue, NewValue 
| where ((OldValue != NewValue) AND (FieldName != "ModifiedDateTime"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, @Tylerdygert&lt;BR /&gt;
The answer has been corrected.&lt;BR /&gt;
There are cool usage of &lt;CODE&gt;spath&lt;/CODE&gt; and comparison method by &lt;CODE&gt;where&lt;/CODE&gt; .&lt;/P&gt;

&lt;P&gt;How about this?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 12:30:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495956#M138232</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-03T12:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495957#M138233</link>
      <description>&lt;P&gt;The spath command is what I have been trying to use and having troubles with. mvzip and mvexpand and the other commands that work with it are all new to me and just havent found anything i can use yet.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 15:13:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495957#M138233</guid>
      <dc:creator>Tylerdygert</dc:creator>
      <dc:date>2019-12-03T15:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495958#M138234</link>
      <description>&lt;P&gt;This search works but I don't really understand it. Why do I need to use an eval=_raw at the start of the search? Will this work for other events that I have? Will this work for other nested fields if I need to search on those?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 15:17:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495958#M138234</guid>
      <dc:creator>Tylerdygert</dc:creator>
      <dc:date>2019-12-03T15:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495959#M138235</link>
      <description>&lt;P&gt;The other commands I mentioned are just ways to deal with multivalue fields, they aren't part of the &lt;CODE&gt;spath&lt;/CODE&gt; command. The &lt;CODE&gt;spath&lt;/CODE&gt; command just takes in a field, which I had to create and called &lt;CODE&gt;_raw&lt;/CODE&gt; since that's the one Splunk uses natively, and parses any JSON format it finds within that field. So for whatever field you have that has the JSON value, specify that as the input. &lt;CODE&gt;_raw&lt;/CODE&gt; is just a representation of everything that makes up the log, and might be a good starting point if what you linked above is the actual log. &lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 16:45:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495959#M138235</guid>
      <dc:creator>aberkow</dc:creator>
      <dc:date>2019-12-03T16:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495960#M138236</link>
      <description>&lt;P&gt;Yes, the event linked above is the raw text of the actual log. That gets parsed into nested JSON based on my props.conf. That is one of many logs though so when I am making this search I'm trying to make it work for any log that comes in. I've been attempting different things with spath but I just dont seem to get any real results. I'll keep trying different things with spath then and see if I can get it to work. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2019 16:50:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495960#M138236</guid>
      <dc:creator>Tylerdygert</dc:creator>
      <dc:date>2019-12-03T16:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495961#M138237</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;Why do I need to use an eval=_raw at the start of the search?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Because &lt;CODE&gt;_raw&lt;/CODE&gt; is the default argument of these commands &lt;CODE&gt;spath&lt;/CODE&gt; and &lt;CODE&gt;kv&lt;/CODE&gt; ,&lt;BR /&gt;
 and the defalut event field.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Will this work for other events that I have? &lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Yes, you can.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Will this work for other nested fields if I need to search on those?&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Maybe you can.  what is these fields? &lt;/P&gt;

&lt;P&gt;my english is broken.&lt;BR /&gt;
I would be happy if you could run it line by line and write a description of my query you understood.&lt;/P&gt;

&lt;P&gt;If my understanding is that props.conf is correct, the field should be expanded like &lt;EM&gt;Results{}.ChangeDetails{}.FieldName&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;In that case, spath is not necessary. Use &lt;CODE&gt;mvzip&lt;/CODE&gt; and &lt;CODE&gt;kv&lt;/CODE&gt; to extract the appropriate fields.&lt;BR /&gt;
After that, I think the &lt;CODE&gt;search&lt;/CODE&gt; is possible.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 00:57:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495961#M138237</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-04T00:57:34Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495962#M138238</link>
      <description>&lt;P&gt;There are 2 basic approaches I use for dealing with nested JSON:&lt;BR /&gt;
First:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Search Here | spath | eval _raw=mvzip(keyFieldName, valueFieldName, "=") | kv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Second&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Search Here | eval foo=spath(_raw, YourPartHere).
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For some reason, using &lt;CODE&gt;eval spath()&lt;/CODE&gt; seems to work much better than &lt;CODE&gt;| spath&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 05:40:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495962#M138238</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-04T05:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495963#M138239</link>
      <description>&lt;P&gt;Your search works great for me except for 1 thing: I need to compare NewValue vs OldValue for each field.&lt;/P&gt;

&lt;P&gt;So, right now, I just get the NewValue for every FieldName using your search. Is there a way I can get NewValue and OldValue for every FieldName?&lt;/P&gt;

&lt;P&gt;Also, I need to get Username out of the events as well so we know who made a change.&lt;/P&gt;

&lt;P&gt;P.S. Your english is great and I appreciate the help!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 15:14:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495963#M138239</guid>
      <dc:creator>Tylerdygert</dc:creator>
      <dc:date>2019-12-04T15:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495964#M138240</link>
      <description>&lt;P&gt;Yes, this is what I'm learning. Either create a new value using eval after spath or put spath into an eval command to get a value.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 15:16:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495964#M138240</guid>
      <dc:creator>Tylerdygert</dc:creator>
      <dc:date>2019-12-04T15:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495965#M138241</link>
      <description>&lt;P&gt;Be sure to come back and click &lt;CODE&gt;Accept&lt;/CODE&gt; on the best answer to close the question and &lt;CODE&gt;UpVote&lt;/CODE&gt; any helpful/useful comments/answers.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 18:20:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495965#M138241</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-04T18:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495966#M138242</link>
      <description>&lt;P&gt;my answer is updated, please check it.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 13:36:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495966#M138242</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-05T13:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495967#M138243</link>
      <description>&lt;P&gt;the results that I'm getting are all field values that aren't in my events. Looks like you set them in the first part of the subsearch?&lt;/P&gt;

&lt;P&gt;Although, this is the format I need, Thank you very much!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 15:44:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495967#M138243</guid>
      <dc:creator>Tylerdygert</dc:creator>
      <dc:date>2019-12-05T15:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495968#M138244</link>
      <description>&lt;P&gt;Be sure to check out the answer by @to4kawa (and &lt;CODE&gt;UpVote&lt;/CODE&gt; it) here!&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answering/787043/view.html"&gt;https://answers.splunk.com/answering/787043/view.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 15:56:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495968#M138244</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-12-05T15:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495969#M138245</link>
      <description>&lt;P&gt;I think there are multiple logs in your environment.&lt;BR /&gt;
I used &lt;CODE&gt;append&lt;/CODE&gt; to simulate it.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;I need to compare NewValue vs OldValue for each field.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I made a difference to make it easier to understand.&lt;BR /&gt;
I am happy to meet your expectations. Happy Splunking.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 16:00:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495969#M138245</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-05T16:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Searching nested JSON to create audit dashboard</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495970#M138246</link>
      <description>&lt;P&gt;Yes, we get about 200 test events per day. This will go into a production environment when it is complete that will have thousands of events every day.&lt;/P&gt;

&lt;P&gt;The main purpose is to be able to search on when a user makes a change to a patient record of some sort.&lt;/P&gt;

&lt;P&gt;I took out the makeresults portions of the search and it looks like I can see all my events that way with just your spath commands.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 16:05:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Searching-nested-JSON-to-create-audit-dashboard/m-p/495970#M138246</guid>
      <dc:creator>Tylerdygert</dc:creator>
      <dc:date>2019-12-05T16:05:34Z</dc:date>
    </item>
  </channel>
</rss>

