> ## Documentation Index
> Fetch the complete documentation index at: https://new.docs.falkordb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# text.join

> Joins an array of strings into a single string using a specified delimiter.

## Description

Joins an array of strings into a single string using a specified delimiter.

## Syntax

```cypher theme={null}
flex.text.join(array, delimiter)
```

## Parameters

| Parameter   | Type   | Required | Description                              |
| ----------- | ------ | -------- | ---------------------------------------- |
| `array`     | list   | Yes      | The array of strings to join             |
| `delimiter` | string | Yes      | The separator to insert between elements |

## Returns

**Type:** string

A single string with all array elements concatenated, separated by the delimiter. Returns `null` if the array is `null` or undefined.

## Examples

### Example 1: Basic String Joining

```cypher theme={null}
RETURN flex.text.join(['apple', 'banana', 'cherry'], ', ') AS result
```

**Output:**

```text theme={null}
result
----------------------
apple, banana, cherry
```

### Example 2: Building CSV Lines

```cypher theme={null}
MATCH (u:User)
WITH [u.id, u.name, u.email] AS fields
RETURN flex.text.join(fields, ',') AS csvLine
```

### Example 3: Creating Tags String

```cypher theme={null}
MATCH (p:Post)
RETURN p.title, flex.text.join(p.tags, ' #') AS hashtags
```

**Output:**

```text theme={null}
title           | hashtags
----------------|------------------
My First Post   | tech #coding #js
```

### Example 4: Building Paths

```cypher theme={null}
WITH ['home', 'user', 'documents', 'file.txt'] AS parts
RETURN flex.text.join(parts, '/') AS path
```

**Output:**

```text theme={null}
path
--------------------------
home/user/documents/file.txt
```

## Notes

* Returns `null` if input array is `null`
* Empty strings in the array are included in the output
* Delimiter can be any string, including empty string
* Commonly used for CSV generation, path building, or tag formatting

## See Also

* [text.format](/udfs/flex/text/format) - Format strings with placeholders
* [coll.zip](/udfs/flex/collections/zip) - Combine two lists

## Frequently Asked Questions

<AccordionGroup>
  <Accordion title="What happens if the array contains null elements?">
    Null elements are included in the output as empty positions between delimiters.
  </Accordion>

  <Accordion title="Can the delimiter be an empty string?">
    Yes. Using an empty string `''` as the delimiter concatenates all elements without any separator.
  </Accordion>
</AccordionGroup>
