• Takes an object and returns a new object whose keys are renamed according to the provided key mapping. Any keys in the input object not present in the key mapping will be present in the output object as-is. If a key in the key mapping is not present in the input object, the output object will contain the key with value "undefined".

    Returns

    An object with renamed keys.

    Parameters

    • keyMapping: Record<string, string>

      An object mapping keys of the input object to keys of the output object.

    • obj: Record<string, any>

      The input object.

    Returns Record<string, any>

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