---
title: "add prefix to values · RUAL Documentation"
description: "Prepends a prefix to each value in the array."
canonical: https://docs.rual.nl/block-types/array/array_add_prefix
language: en
---

# add prefix to values

This block is part of the [`array`](https://docs.rual.nl/block-types/array) group and was last modified in core [`v14.0.4`](https://docs.rual.nl/core-versions/140004).

Prepends a prefix to each value in the array.

- array required `array`

- prefix required `value` The value to prepend to each item

- array `array`

Returns a new array where each element is the prefix string followed by the element coerced to text with JS String() rules (null becomes "null", objects become "[object Object]", arrays comma-join). Every output element is a string. A missing or non-array input yields an empty array.

| `prepend` |
| --- |

A typical wiring for [add prefix to values](https://docs.rual.nl/block-types/array/array_add_prefix): [with values](https://docs.rual.nl/block-types/array/array_of_values) feeds the `array` pin; [value](https://docs.rual.nl/block-types/value/value_default) feeds the `prefix` pin; the `array` out pin feeds [length](https://docs.rual.nl/block-types/array/array_length).

![Studio canvas example for the add prefix to values block: typical wiring for add prefix to values.](https://docs.rual.nl/canvas-examples/array_add_prefix.png)

### Version history

Introduced in [`v14.0.4`](https://docs.rual.nl/core-versions/140004).
