Array

Multiple Value - Array

HTML
<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>

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.

Config
{
    "redTexts": {
        "selector": ".red",
        "type": "array"
    }
}

// or use this shortcut

{
    "redTexts": ".red | array"
}
Output
{
    "redTexts": [
        "Red Text 1", 
        "Red Text 2", 
        "Red Text 3"
    ] 
}

Last updated