Solved

Querying an array

  • 6 October 2021
  • 2 replies
  • 165 views

Badge

Hi!

Is it possible to check the first, last or any other position in an array in user properties during segmentation?

For example: I can check if an array contains an element that is X. But how do I check if *the last element* in the array is X?

 

 

icon

Best answer by Saish Redkar 6 October 2021, 20:33

View original

2 replies

Userlevel 7
Badge +10

Hey @Daniel 
From what I know, this isn’t possible with the current operators out there if you are sending it as an array.

One way could be to try sending the array as a string instead and then using some glob expressions to match the last element for X. A not so clean approach, but you can give it a try if your use case calls for it. 

Hope I have interpreted your use case correctly.

 

 

Badge

Thanks @Saish Redkar! I’ll try that!

Reply