Splunk Search

How to query two nullable nested fields are not equal? [newbie question]

roliu
New Member

Hi, 

I have a dataset like below

 

 

[
  {classificationA: null, classificationB: null},
  {classificationA: {name: 'Education'}, classificationB: {name: 'Education'}},
  {classificationA: {name: 'IT'}, classificationB: {name: 'IT'}}
} 

 

 

My aim is to find all the rows whose classificationA is not equals to classificationB. So given the above dataset, it should return zero rows.

I thought it should be:

 

 

 | where classficationA != classficationB

 

 

But it is not working.  Anyone can help? Thank you!

Labels (2)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Is that your 'raw' data - it is not valid JSON. Is that a single event or 3 events?

Please share the raw data - if it's 3 classifications inside a single event, then please paste an example of the true _raw element of the value of a field that's extracted

 

0 Karma
Get Updates on the Splunk Community!

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2025 SplunkTrust is officially open! If you ...

Splunk Answers Content Calendar, June Edition II

Get ready to dive into Splunk Dashboard panels this week! We'll be tackling common questions around ...

Splunk Observability Cloud's AI Assistant in Action Series: Auditing Compliance and ...

This is the third post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...