---
title: How do I use an array variable in a load rule?
description: This article describes how to use an array variable in a load rule.
url: https://docs.tealium.com/iq-tag-management/frequently-asked-questions/how-do-i-use-an-array-variable-in-a-load-rule/
---## Question

Can I use an array variable in a load rule with a condition such as CONTAINS?

## Answer

Yes.

The JavaScript code generated by load Rule conditions uses the `toString()` method, which will convert an array to a comma-delimited string. A load rule that uses the CONTAINS condition, for example, will convert the variable to a string using `toString()`, then use `indexOf()` to find the value you want within the variable.

```
> product_name = ["Nexus One", "Samsung Razor", "Apple iPhone"]
["Nexus One", "Samsung Razor", "Apple iPhone"]

> product_name.toString()
"Nexus One,Samsung Razor,Apple iPhone"

> product_name.toString().indexOf("Apple")
24
```
