Array Transform

When you want to change an array result while parsing, you can use the arrayTransform method for this.

HTML
<ul>
  <li>orange</li>
  <li>apple</li>
  <li>pineapple</li>
</ul>
Config
{
    "fruits": {
        "selector": "ul li | array",
        "arrayTransform": (arr) => arr.join(', ')
    },
}
Output
{
    "fruits": "orange, apple, pineapple",
}

Last updated