Gets an array of pairs (array of length 2) indicating all of the keys and values within a given array or object.

This function is valid in v2.8.0 to v2.22.1. This function has been downloaded 28 times.


{*} value
Value for which you would like the property names retrieved.
{boolean=} opt_onlyNonEnums Optional
If specified and is not null or undefined but is false-ish, all of the property key/value pairs (enumerable or not) will be returned. If this is true-ish only the non-enumerable property key/value pairs will be returned. If this is not given or is null or undefined all of the enumerable property key/value pairs will be returned.


An array of pairs (arrays where the first item is the key and the second is the value).

Required Function

This function directly requires the following function which is included automatically:

  • keys()
    Gets the keys of a specified value.

Requiring Functions

This function is directly required by the following functions:

  • invert()
    Creates the inverse of an object by making a new object where the keys are the values and the values are the keys.
  • only()
    Creates a new object with only the specified keys copied from the specified object to this new object.
  • postURL()
    Takes a URL and goes to it using the POST method.
  • uneval()
    Creates a string representation of the given object or primitive.