# array()

```
node-set array([node-set nodes])
```

wraps the nodes of the node set `nodes` in a `<json array="">…</json>` structure, so that they can be used as an array in a [JSON Template](https://sevenval.gitbook.io/flat/reference/templating).

if the `nodes` contain an attribute (e.g. `a="b"`), it will be converted to an element `<value name="a">b</value>`), so that key and value are easily accessible in the template.

## Example

JSON:

```javascript
{"users": [ {"name": "Alice"},{"name": "Bob"}]}
```

Template-Action:

```markup
<template>
   { "names": {{ array(users//name) }} }
</template>
```

Output:

```javascript
{ "names": ["Alice","Bob"] }
```
