Closed AaronAcerboni closed 8 years ago
Can we make it 'each' instead I 'forEach' ?
Premasagar Rose, Dharmafly http://dharmafly.com dharmafly.com / 07941 192398 premasagar.com twitter.com/premasagar L4RP.com asyncjs.com
<div>
<p class="bar">bar</p>
<table>
<tr><td class="age">1</td> <td class="name">2</td> <td class="foo">3</td> <td class="foo">4</td></tr>
</table>
</div>
QUERY
{
"url" : "http://example.com/people",
"type" : "html",
"map" : {
"bar": ".bar",
"people": {
"selector": "table tr",
"map": {
"age": {
"selector": "td.age"
},
"name": {
"selector": "td.name"
},
"foo": {
"selector": "td.foo"
}
}
}
}
}
RESULT
{
"bar": ["bar"],
"people": [
{
"age": [1],
"name": [2],
"foo": [3, 4]
},
{
"age": [1],
"name": [2],
"foo": [3, 4]
}
]
}
I've just starting working on this great library. Thanks a lot for opensourcing it What is the state of this feature ?
I'm glad you're finding Noodle useful. This feature didn't yet make it into code. The library isn't under active development but I'm happy to review and accept pull requests, especially if they are accompanied by tests.
Premasagar Rose premasagar.com dharmafly.com twitter.com/premasagar github.com/premasagar
This will make taking data from tables or lists easy.
Example: