Extract data from a table with headers and rows of data:
| Header 1 | Header 2 |
|---|---|
| Data 1 | Data 2 |
| Data 3 | Data 4 |
This library has one method - filter() - which returns filtered data from a defined array of filters that run in sequence.
Filters:
- unique
- match
- compare
- sequence (sequence of the above)
We need more documentation!
Descripiton:
- A
filteris an array of test to run on the table. The data from the first test will be passed to the next test until all test hav passed. dataandcountwill be returned.- If the
uniquefilter is used no data is returned at the moment. typeof filter= match | unique | compareheader= name of the header to apply filter onregexp= regular expression whenmatchis usedcondition= conditional test:<= | >= | < | > | = | !=(!=is not yet implemented)
Sample filter:
[
{
"type": "match",
"header": "Header 1",
"regexp": "^Data (1|3)$"
},
{
"type": "compare",
"header": "Header 2",
"condition": "<=",
"value": "Data 2"
},
{
"type": "unique",
"header": "Header 1"
}
]