# toString

Converts the given argument to a string.

Does not support maps or arrays at this time.

#### Syntax

```
toString(value)
```

#### Arguments

* **value** - The value to convert. Supported types: string, int, float, bool.

#### Examples

**Basic conversions**

```
toString("hello") // "hello"
toString(123) // "123"
toString(123.4) // "123.4"
toString(false) // "false"
toString(true) // "true"
```

**CLI usage — convert a number to a string**

```bash
$ echo '{"port": 8080}' | dasel -i json 'toString(port)'
8080
```

**Useful for string concatenation**

```
"port:" + toString(8080)
// "port:8080"
```


---

# 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://daseldocs.tomwright.me/functions/tostring.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.
