Function deepCopyUsingJsonStringify

  • Creates a deep copy of an object using JSON stringify/parse

    Parameters

    • obj: {
          [k: string]: any;
      }

      The object to deep copy

      • [k: string]: any

    Returns {
        [k: string]: any;
    }

    A deep copy of the input object

    • [k: string]: any

    This method has limitations with functions, undefined values, symbols, etc.