Skip to main content

I need a way to be able to tell the difference in Amplitude between when an event property’s value is an empty array/list “ ]” vs. when the event did not receive a value for that event property at all.

 

Doing the usual = (none) or set is (none) doesn’t work at telling them apart. I think I can use the glob match function but I’m struggling to figure out what the correct syntax would be since the square brackets are used as part of the glob match language. How do I escape them and write a glob match string that resolves to e]?

 

Basically, can I create a chart that can capture the difference between the events in the 2 screenshots below (specifically for the user property called “updates.EOC”)?

 

Event where the property’s value is an empty array

 

Event without the property at all

 

Thanks in advance!

Hi @ynadeem ! Thanks for your question.

To my knowledge, empty arrays will always be treated as (none) values, so there wouldn’t be a way to filter for an empty array. Like you said, using “set is” still returns all none values. Glob match likely won’t work since the empty array doesn’t technically have any values to query on and the brackets are not stringified for querying either. 

That said, I’m curious if anyone else in the community has any ideas too!


Hey @ynadeem ,

Agree with Tracy here.  I tried sending some test events on my end with (none) vs s] , and both of them evaluated to none in the segmentation chart. If you really need to find the presence of o], then sending it as a string ( "updates.EOC": "" ]" ) seems like the best option.


 "updates.EOC": ]  vs  "updates.EOC": ""]"

 


Reply