Underscore.js _.pairs() Function
The _.pairs() function is used to convert an object into [key, value] pairs.
_.pairs( object )
Parameters: This function accepts one parameter as mentioned above and described below:
- object: It contains the object element that holds the elements of key and value pair.
Return Value: It returns the list of [key, value] pair.