# Object Transformers

Object transformers can be used on a value data type of `Array`, including dictionaries coming from other transformers, such as by using dot notation on another dictionary. Following transformers are available:

## `keys`

Returns `Array` with all keys of the source dictionary.

* Usage: `.keys()`
* Example usage: `dictionary.keys()`
* Example return: `["bob": "ferrari", "dan": "lada"]` to `["bob", "dan"]`

## `values`

Returns `Array` with all values of the source dictionary.

* Usage: `.values()`
* Example usage: `dictionary.values()`
* Example return: `["bob": "ferrari", "dan": "lada"]` to `["ferrari", "lada"]`

## `add`

Returns copy of the source dictionary extended by provided `key`: `value`. Value can be either plain value or evaluated piece of context.

* Usage: `.add(key, value)`
* Example usage: `value.add("Also Bob", self.bob)`
* Example return: `["bob": "ferrari", "dan": "lada"]` to `["bob": "ferrari", "dan": "lada", "Also Bob": "ferrari"]`

## `count`

Returns the number of key-value pairs in the collection. Note that if the dictionary is nested, it will not count the size of nested elements, only key-value pairs of the root level.

* Usage: `.count()`
* Example usage: `dictionary.count()`
* Example return: `["bob": "ferrari", "dan": "lada"]` to `2`&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://supernova-developers.gitbook.io/supernova-dsm/pulsar-language/transformers/dictionary-transformers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
