![]() |
VOOZH | about |
Underscore.js_.pairs() function is used to convert an object into an array of arrays that contain the [key, value] pairs of the object as elements.
_.pairs( object );It returns the array of [key, value] pairs.
Example 1: The below code example implements the _.pairs() function of underscore.js practically.
Output:
👁 ImageExample 2: The below code example illustrates the another use of _.pairs() function of underscore.js.