HPSM - JavaScript - how to push only unique data into array

Hello experts,

Do you know, how can I push only unique data from JS query into array?

I have tried indexOf or set from ES6 JavaScript but they don't work in HPSM...

Best regards,

Dino