• JMap.Util.Array.getCopyWithoutDuplicate

    Get a copy of the given array without duplicate.

    Parameters

    • array: (string | number)[]

      the array

    Returns (string | number)[]

    given array copy, without duplicate

    Example

    const myNumbers = [1, 4, 2, 6, 1, 2, 8]
    // returns array copy containing no duplicate
    const copy = JMap.Util.Array.getCopyWithoutDuplicate(myObjects, "name", "Red")
    console.log(`Copy: "${JSON.parse(foundObject)}"`)
    // display message 'Copy: "[1, 4, 2, 6, 8]"'