Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Object

Index

Functions

clone

  • clone(objToClone: object): any
  • description

    Receives a JSON object or an Array and clones it

    Parameters

    • objToClone: object

    Returns any

    JSON object cloned

dotToJson

  • dotToJson(obj: object): object
  • description

    Gets a JSON object with dot notation and turns it to a JSON

    Parameters

    • obj: object

    Returns object

    JSON object without the dot notation

isEqual

  • isEqual(a: object, b: object): boolean
  • description

    Compares 2 objects and returns TRUE or FALSE

    Parameters

    • a: object
    • b: object

    Returns boolean

    TRUE or FALSE

joinTwoObjects

  • joinTwoObjects(obj1: object, obj2: object): object
  • description

    Receives 2 JSON objects and merges/joins them

    Parameters

    • obj1: object

      Object 1

    • obj2: object

      Object 2

    Returns object

    A JSON object with properties of both objects

jsonToDot

  • jsonToDot(a: object): object
  • description

    Gets a JSON object and turns it to dot notation

    Parameters

    • a: object

    Returns object

    JSON object with dot notation

removeDuplicate

  • removeDuplicate(arr: any[]): any[]
  • description

    Gets an array and removes all duplicate values

    Parameters

    • arr: any[]

    Returns any[]

    The entered array without duplicate values

removeDuplicateByKey

  • removeDuplicateByKey(arr: object[], key: string): object[]
  • Gets an array of JSON objects and removes duplicate values by key

    Parameters

    • arr: object[]
    • key: string

    Returns object[]

removeUndefined

  • removeUndefined(obj: object): object
  • description

    Searchs a JSON object and deletes all keys that have the value undefined

    Parameters

    • obj: object

    Returns object

    JSON object without undefined values

setObjectPath

  • setObjectPath(obj: object, path: string, value: any): void
  • description

    Set the value on the desired path of the JSON object

    Parameters

    • obj: object

      JSON object

    • path: string

      Path key united by "." ex: user.info.name

    • value: any

      Value for the selected path

    Returns void

Generated using TypeDoc