back to Overview

_.values()

Creates a Minified list containing all property values of the specified object.
Util module only.

Syntax

_.values(obj)

Parameters

object
The object to gather values from.
(return value)
A Minified list containing the property names.

Description

Creates a Minified list containing all property values of the specified object. Only direct properies are included, not inherited ones. The order of the values in the list is undefined and runtime-specific.

Example

Using values():

var obj = {a: 2, b: 52};
var values = _.values(obj);  // keys contains [2, 52] now

See also..

  • _.keys() retrieves the property names of an object as a list.

Comments

comments powered by Disqus

back to Overview

Functions