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.
<div class="parent">
<div class="blue">Blue Text</div>
</div>
Let's get the content of the element with the blue
class.
{
"blueText": ".blue"
}
{
"blueText": "Blue Text"
}
Alternative Selector
Now let's specify an alternative selector.
{
"greenOrBlueText": ".green, .blue"
}
Since there is no element with green
class, it will still get the content of the element with blue
class.
Last updated
Was this helpful?