# Array

### Multiple Value - Array

{% code title="HTML" %}

```markup
<div class="parent">
  <div class="red">Red Text 1</div>
  <div class="red">Red Text 2</div>
  <div class="red">Red Text 3</div>
</div>

```

{% endcode %}

Now let's sum the contents of all the elements with the `red` class. If we are going to collect more than one value, we need to declare it to muninn. Otherwise, it will return the result of the first element it finds.

{% code title="Config" %}

```javascript
{
    "redTexts": {
        "selector": ".red",
        "type": "array"
    }
}

// or use this shortcut

{
    "redTexts": ".red | array"
}
```

{% endcode %}

{% code title="Output" %}

```javascript
{
    "redTexts": [
        "Red Text 1", 
        "Red Text 2", 
        "Red Text 3"
    ] 
}
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wopehq.gitbook.io/muninn/config/array.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
