posthog icon indicating copy to clipboard operation
posthog copied to clipboard

feat(hog): arrayMap, arrayExists, arrayFilter

Open mariusandra opened this issue 1 year ago • 0 comments

Problem

Alternative to https://github.com/PostHog/posthog/pull/24636

Changes

Adds support for arrayMap, arrayExists, arrayFilter:

print(arrayMap(x -> x * 2, [1,2,3]))
print(arrayExists(x -> x like '%nana%', ['apple', 'banana', 'cherry']))
print(arrayFilter(x -> x like '%e%', ['apple', 'banana', 'cherry']))

These are built as STL functions that can call back closures

How did you test this code?

WIP

mariusandra avatar Aug 28 '24 11:08 mariusandra