Pricing Blog

I need to match two arrays based of IDs inside each position.

  • uunicode-1435020958380457984

    unicodes

    5 days ago

    I have two arrays, and I want to match them based on each position’s ID. Do you know a performant solution?
    1435035568609427599-Screenshot_2025-11-04_at_00.38.20.png
  • uunicode-1435035611131023441

    unicodes

    5 days ago

    I'm looking for something smarter than this. 🙏
  • erikbeus-1435165725189869599

    Erik Beuschau

    4 days ago

    You could avoid the If formula by replacing it with a Default to formula that falls back to your item when nothing was found with the Find.
    You could also consider passing in your API data as an input to your formula, but instead of an array it would be an object keyed by the id you're looking for. That would make the comparisons much faster as you wouldn't need to use Find (just Get instead)
  • uunicode-1435166238526410772

    unicodes

    4 days ago

    I'm testing this one, focusing on keeping all from the newArray, and deleting fromt he oldArray what's present in the newArray.
    1435166237930815520-Screenshot_2025-11-04_at_09.17.02.png
  • uunicode-1435166505049391195

    unicodes

    4 days ago

    Using defaultTo, do you think that could improve my last formula?
  • erikbeus-1435166680140484701

    Erik Beuschau

    4 days ago

    Yes a little bit - probably not a lot. changing your array into an object keyed by id would make a bigger difference
  • erikbeus-1435166743927722025

    Erik Beuschau

    4 days ago

    It looks strange that you're filtering based on an index?
  • uunicode-1435167179007070309

    unicodes

    4 days ago

    It returns 0 or -1 and this means true or false (it works :)) ). Let me try your solution 🙂
    👍1
  • uunicode-1435174735213236314

    unicodes

    4 days ago

    I'm curios if this is faster. Do you know a way to take a timestamp at the begining and one timestamp at the end?
    1435174734995128382-Screenshot_2025-11-04_at_09.51.16.png
  • erikbeus-1435178665251176488

    Erik Beuschau

    4 days ago

    It's probably faster. There's no easy way to compare the performance builtin to Nordcraft atm. But you could use the browser's profiler in devtools if you want 😅