flattenKeys()

Creates a new object with keys to all of the values regardless of the level(excluding recursive objects). Keys for values on deeper levels will be joined by a "." while any dots or backslashes in the original keys will be escaped with a leading blackslash.

This function is valid in v2.17.0 to v2.24.3. This function has been downloaded 53 times.

Parameters

{Object} obj
The object whose keys should be flattened.
{boolean=} opt_keyedObjects Optional, Default:false
Determines whether or not to keep the objects as well as adding flattened keys.

Returns

{Object}
Returns a new object representing obj but having all nested keys represented by flat keys within the returned object.

Requiring Function

This function is directly required by the following function:

  • toParams()
    Takes an object and turns it into a serialized URL parameter string.