• Adds a key value pair to the given objects and returns a shallow copy. If the key is already present it will be overwritten.

    Returns

    The object with the key value pair added.

    Type Parameters

    • T

    Parameters

    • key: string

      Key to be added.

    • value: any

      Value to be added.

    • obj: T

      Object the key value pair is added to.

    Returns T & {
        [key: string]: any;
    }

Copyright Ⓒ 2023 SAP SE or an SAP affiliate company. All rights reserved.