# Join

Join allows you to join multiple values into a single string. This is dasels version of concatenation.

Expects 1 or more arguments.

## Arguments

The first argument is required, and is the separator used when joining the strings.

Any further arguments are optional.

If no additional arguments are given, join uses the output of the previous function as it's input and will join those values.

If additional arguments are given, join uses those values as selectors and joins the result of those selectors.

If you wish to join data with plain strings you may use the [`string`](/v2/functions/string.md) function.

{% hint style="info" %}
Be aware that the separator must always be a plain string and cannot contain any selector functions.
{% endhint %}

## Examples

### Join with no additional arguments

```
$ echo '{
  "name": {
    "first":"Tom",
    "last":"Wright"
  }
}' | dasel -r json 'name.all().join( )' 
"Tom Wright"
```

### Join with arguments

```
$ echo '{
  "name": {
    "first":"Tom",
    "last":"Wright"
  }
}' | dasel -r json 'name.join( ,string(Hello\\, my name is ),first,last)' 
"Hello, my name is  Tom Wright"
```


---

# 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/v2/functions/join.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.
