muninn
GitHubExtensionWope
  • Introduction
  • Config
    • Basic
    • Selector
    • Array
    • Attribute
    • Type
    • Regex
    • Transform
    • Array Transform
    • Exist
    • Schema
    • Trim
    • Initial
    • Fill
    • HTML
    • Methods
Powered by GitBook
On this page

Was this helpful?

  1. Config

Selector

We determine which element in the DOM the data we want to receive is in with the help of a selector. In this way, when we parse the HTML, muninn knows what data it needs to receive.

HTML
<div class="parent">
  <div class="blue">Blue Text</div>
</div>

Let's get the content of the element with the blue class.

Config
{
    "blueText": ".blue" 
}
Output
{
    "blueText": "Blue Text" 
}

Alternative Selector

Now let's specify an alternative selector.

Config
{
    "greenOrBlueText": ".green, .blue"
}

Since there is no element with green class, it will still get the content of the element with blue class.

PreviousBasicNextArray

Last updated 2 years ago

Was this helpful?