HTML Extractor Default value

Hello Community,

I’m new to this tool, I’m just trying to parse an HTML result, this has a lot of different elements with the same CSS class structure, for example: .card__price, .card__address, etc. To return all the findings in the Extract I added the generate arrays option. But now I receive two different arrays, one per field. The main problem is that not all the data has both fields, so perhaps the price is not there in the HTML. So afterward I end up receiving n Arrays one per field, with no correlation, so I can’t understand which element from the first array corresponds to which element in the second array. IE: array1 (prices) elements [23,22,15] Array2 (addresses) [“123 av”,“124 av”] so, how do I know if element [0] is the right for element[0] on the next array? perhaps using expressions? Or returning a default value if possible? Can you please help me, I’m blocked

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
  • n8n version: 1.60.1
  • Database (default: SQLite): Default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Windows 11

Welcome to the community @Dan_Salazar_Nunez !

Tip for sharing information

Pasting your n8n workflow


Ensure to copy your n8n workflow and paste it in the code block, that is in between the pairs of triple backticks, which also could be achieved by clicking </> (preformatted text) in the editor and pasting in your workflow.

```
<your workflow>
```

That implies to any JSON output you would like to share with us.


It would help if you have shared your workflow with so that we could help you out. No webpage is the same and each would require an individual approach.