Filter an addon

Options
geraldoNeto
geraldoNeto Unconfirmed, Member
edited September 2023 in ? Transforming data

I'd like to filter a result with lambda from an Addon. ex: the user has many cars. when I call this user, I have an addon that brigs all his cars. Can I filter this Addon to bring me only the red cars for exemple? I know that's easier to call all red cars with the user ID = x. But I have a situation where I have some records that is comom for all users but if a user needs an especific record he can create his on record.

Answers

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Hi,

    I don't think that you need lamda for that (but of course it can be done using lambda)

    I would suggest looking at the array functions. For example using find all elements you can pick your cars list from addon by using dot notation (user.cars) or get filter and then in array function apply the required filters.