Options
All
  • Public
  • Public/Protected
  • All
Menu

Module zipObject

Index

References

Functions Array

References

Renames and re-exports zipObject

Array Functions

  • zipObject(props: string[], values: any[]): any
  • This method is like fromPairs except that it accepts two arrays, one of property identifiers and one of corresponding values.

    since

    5.3.0

    see

    unzip,unzipWith,zip,zipObjectDeep,zipWith

    example
    zipObject(['a', 'b'], [1, 2])
    // => { 'a': 1, 'b': 2 }

    Parameters

    • props: string[]

      The property identifiers.

    • values: any[]

      The property values.

    Returns any

    Returns the new object.