Hello,
I use a HTML (extract HTML Content) node to filter a webpage and extract text for a specific class.
As output I get a (single item) JSON array like this :
[
{
"data": [
"AAA BBB CCC",
"AAA AA DDD", <<< to keep
"BBBB CCC",
"AAAAA EE",
"BBB FF",
"C JJJ",
"GG HHHHHHH",
"II AAA AA HHH" <<< to keep
]
}
]
My goal is to filter items of this JSON array in order to keep those who match a pattern (eg AAA AA).
I tried the filter node (eg {{ $json.data }} contains "AAA AA" and code nodes without success.
I reviewed forums and tutorials without success either.
I’ve seen examples to iterate over multiple items but not for a single item array/list.
Does anyone have an example to achieve this ?
Thanks
Samp.
n8n Version : 1.31.2
Database : SQLite
Running on: Docker
O.S. : Linux