Values

Values[key1val1,key2val2,]

gives a list of the values vali in an association.

Values[{key1val1,key2val2,}]

gives a list of the vali in a list of rules.

Values[expr,h]

gives a list of values in expr, wrapping each of them with head h before evaluation.

Details

  • Values maintains the order of values.
  • Values[key->val] gives val.
  • Use Values[expr,Hold] to extract values without letting them evaluate.

Examples

open allclose all

Basic Examples  (4)

Get the values in an association:

Get values from a list of rules:

Values automatically threads over lists:

Wrap values with Hold to prevent evaluation:

Properties & Relations  (3)

Values are listed in the order of their appearance:

Values automatically threads over lists, but not associations:

Values returns values of a TimeSeries input:

Introduced in 2014
 (10.0)
 |
Updated in 2019
 (12.0)