Jmespath filter in code node not working

Great to hear that it helped @pghahrem !

Also good to hear that it was helpful for you @dickhoning. What you wrote is almost correct. The only thing that is not correct is the example for “And that with the same (DISPLAYED) data, but only 1 item, the data in the background is” is not correct.
The reason is that by definition (as that is how n8n internally expects the data and how everything is written), the json key has to contain an object and is not allowed to be set to an array. Meaning the array would have to be underneath a key (for example data), and would so look like this:

[
  {
    "json": {
      "data": [
        {
          "Activity": "Fitness Kurs 1",
          "Trainer": "Monika",
          "Name": "Inge"
        },  
        {
          "Activity": "Fitness Kurs 1",
          "Trainer": "Monika",
          "Name": "Eveline"
        },
        {
          "Activity": "Fitness Kurs 2",
          "Trainer": "Anna",
          "Name": "Ingrid"
        }
      ]
    },
    "pairedItem": {
      "item": 0
    }
  }
]
1 Like