---
title: "array:populate — Populate array"
description: "iXML command array:populate: Populate array."
canonical_url: "https://www.zeyos.com/ixml/ref/array-populate"
markdown_url: "https://www.zeyos.com/ai/guide/ixml/ref/array-populate.md"
section: "ixml-reference"
authority: "reference"
language: "en"
source_repository: "https://cloud.zeyos.com/__doc/ixmldoc.xml"
source_sha256: "a23f04e6a98628ca3c273c3b8dd2c33c034cfda3e0f00478d8793074fd2f70dd"
---

# array:populate — Populate array

ARRAY:POPULATE imports all associated key and value pairs from an array into the local variable scope by treating keys as variable names, expanded by a given prefix, and values as non-referential variable values.

### Attributes
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| var | var |  | Variable name |
| prefix | string |  | Prefix |

### Children
- (none)

### Parents
- (not restricted in the reference)

### Result
- (none documented)

### Examples

```xml
<array var="names">
	<item key="bg">Bill Gates</item>
	<item key="sj">Steve Jobs</item>
</array>

<array:populate var="names" prefix="n_"/>
<output>$n_bg and $n_sj are competitors!</output>

<!-- Bill Gates and Steve Jobs are competitors! -->
```
