# ee.Dictionary.values

Returns the values of a dictionary as a list. If no keys are specified, all values are returned in the natural ordering of the dictionary's keys.

<br />

| Usage | Returns |
|---|---|
| `Dictionary.values(*keys*)` | List |

| Argument | Type | Details |
|---|---|---|
| this: `dictionary` | Dictionary |   |
| `keys` | List, default: null |   |

## Examples

### Code Editor (JavaScript)

```javascript
// A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
var dict = ee.Dictionary({
  B1: 182,
  B2: 219,
  B3: 443
});

print('Values for selected keys converted to ee.List',
      dict.values(['B1', 'B2']));
print('Values for all keys converted to ee.List', dict.values());
```
Python setup

See the [Python Environment](https://developers.google.com/earth-engine/guides/python_install) page for information on the Python API and using
`geemap` for interactive development.

```python
import ee
import geemap.core as geemap
```

### Colab (Python)

```python
# A dictionary (e.g. results of ee.Image.reduceRegion of an S2 image).
dic = ee.Dictionary({
    'B1': 182,
    'B2': 219,
    'B3': 443
})

display('Values for selected keys converted to ee.List:',
        dic.values(['B1', 'B2']))
display('Values for all keys converted to ee.List:', dic.values())
```