# ee.Dictionary.getInfo

<br />

Retrieves the value of this object from the server.

<br />

If no callback function is provided, the request is made synchronously. If a callback is provided, the request is made asynchronously.

The asynchronous mode is preferred because the synchronous mode stops all other code (for example, the EE Code Editor UI) while waiting for the server. To make an asynchronous request, evaluate() is preferred over getInfo().

Returns the computed value of this object.

| Usage | Returns |
|---|---|
| `Dictionary.getInfo(*callback*)` | Object |

| Argument | Type | Details |
|---|---|---|
| this: `computedobject` | ComputedObject | The ComputedObject instance. |
| `callback` | Function, optional | An optional callback. If not supplied, the call is made synchronously. |

## 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
});

// Request the server-side ee.Dictionary as a client-side object.
print('Client-side object', dict.getInfo());
print('Using the client-side object', Object.keys(dict.getInfo()).length);
```
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
})

# Request the server-side ee.Dictionary as a client-side object.
display('Client-side object:', dic.getInfo())
display('Using the client-side object (e.g. fetch number of keys):',
      len(dic.getInfo().keys()))
```