ao-js-sdk - v0.0.9
    Preparing search index...

    Function mergeLists

    • Merges two lists of objects based on a key function First list items will be overridden by second list items with the same key

      Type Parameters

      • T

      Parameters

      • list1: T[] = []

        First list of objects

      • list2: T[] = []

        Second list of objects (takes precedence over list1)

      • getKey: (item: T) => string

        Function to extract the key from an object

      Returns T[]

      Merged list with duplicates removed based on key