Item List Split Out Items: Couldn’t Find the Field Error

Hello!!! I have a workflow where I retrieve data from API and then Item List node.
I have a problem to split the data from the node into items.

I have a problem to split the data from the node into items.

I’m posting a sample JSON that is provided, but can’t split it because it says field cannot be found.

[
    {
       "data":{
          "students":[
             {
                "id":5405,
                "isAdult":0,
                "isActive":1,
                "createdAt":"2023-01-26 09:37:27",
                "updatedAt":"2023-01-26 09:38:54",
                "user":{
                   "id":11366,
                   "login":"OctoP",
                   "name":"Pio",
                   "lastName":"Octo",
                   "fullname":"Pio Octo",
                   "systemRole":"student",
                   "isArchived":0,
                   "createdAt":"2023-01-26 09:37:27",
                   "updatedAt":"2023-01-26 09:38:54",
                   "additionalData":{
                      "id":11348,
                      "phone":"",
                      "mobile":null,
                      "email":null,
                      "skype":null,
                      "street":null,
                      "zipCode":null,
                      "city":null,
                      "country":null,
                      "post":null,
                      "province":null,
                      "pesel":"",
                      "nipNumber":null,
                      "birthDate":null,
                      "birthPlace":null,
                      "description":null,
                      "billingName":"Madame Octo",
                      "billingStreet":null,
                      "billingCity":null,
                      "billingZipCode":null,
                      "billingNipNumber":null,
                      "billingPesel":null,
                      "billingEmail":null,
                      "createdAt":"2023-01-26 09:37:27",
                      "updatedAt":"2023-01-26 09:37:27"
                   },
                   "parentUser":{
                      "id":11369,
                      "login":"OctoPR",
                      "name":"Madame",
                      "lastName":"Octo",
                      "fullname":"Octo Tom",
                      "systemRole":"parent",
                      "isArchived":0,
                      "createdAt":"2023-01-26 09:37:27",
                      "updatedAt":"2023-01-26 09:38:54",
                      "additionalData":{
                         "id":11351,
                         "phone":null,
                         "mobile":"+44656653",
                         "email":"[email protected]",
                         "skype":null,
                         "street":null,
                         "zipCode":null,
                         "city":null,
                         "country":null,
                         "post":null,
                         "province":null,
                         "pesel":null,
                         "nipNumber":null,
                         "birthDate":null,
                         "birthPlace":null,
                         "description":null,
                         "billingName":"Octo Madame",
                         "billingStreet":null,
                         "billingCity":null,
                         "billingZipCode":null,
                         "billingNipNumber":null,
                         "billingPesel":null,
                         "billingEmail":null,
                         "createdAt":"2023-01-26 09:37:27",
                         "updatedAt":"2023-01-26 09:37:27"
                      },
                      "parentUser":null
                   }
                }
             },
             {
                "id":5414,
                "isAdult":0,
                "isActive":1,
                "createdAt":"2023-01-26 09:54:04",
                "updatedAt":"2023-01-26 09:54:21",
                "user":{
                   "id":11384,
                   "login":"JhoncinsO",
                   "name":"Jhon",
                   "lastName":"Arrow",
                   "fullname":"Jhon Arrow",
                   "systemRole":"student",
                   "isArchived":0,
                   "createdAt":"2023-01-26 09:54:04",
                   "updatedAt":"2023-01-26 09:54:21",
                   "additionalData":{
                      "id":11366,
                      "phone":"",
                      "mobile":null,
                      "email":null,
                      "skype":null,
                      "street":null,
                      "zipCode":null,
                      "city":null,
                      "country":null,
                      "post":null,
                      "province":null,
                      "pesel":"",
                      "nipNumber":null,
                      "birthDate":null,
                      "birthPlace":null,
                      "description":"PIA Gr.6 17:30 Mon",
                      "billingName":"Joana Arrow",
                      "billingStreet":null,
                      "billingCity":null,
                      "billingZipCode":null,
                      "billingNipNumber":null,
                      "billingPesel":null,
                      "billingEmail":null,
                      "createdAt":"2023-01-26 09:54:04",
                      "updatedAt":"2023-01-26 09:54:04"
                   },
                   "parentUser":{
                      "id":11387,
                      "login":"AjOR",
                      "name":"Joana",
                      "lastName":"Anama",
                      "fullname":"Joana Arrow",
                      "systemRole":"parent",
                      "isArchived":0,
                      "createdAt":"2023-01-26 09:54:04",
                      "updatedAt":"2023-01-26 09:54:21",
                      "additionalData":{
                         "id":11369,
                         "phone":null,
                         "mobile":"+444444444",
                         "email":"[email protected]",
                         "skype":null,
                         "street":null,
                         "zipCode":null,
                         "city":null,
                         "country":null,
                         "post":null,
                         "province":null,
                         "pesel":null,
                         "nipNumber":null,
                         "birthDate":null,
                         "birthPlace":null,
                         "description":null,
                         "billingName":"Joana",
                         "billingStreet":null,
                         "billingCity":null,
                         "billingZipCode":null,
                         "billingNipNumber":null,
                         "billingPesel":null,
                         "billingEmail":null,
                         "createdAt":"2023-01-26 09:54:04",
                         "updatedAt":"2023-01-26 09:54:04"
                      },
                      "parentUser":null
                   }
                }
             }
          }
       ]
    }
 }
 ]

Information on my n8n setup

  • n8n Version 0.213.0
  • Running n8n via Docker on MySQL

Hi @Todinio, welcome to the community :tada:

From looking at your example it seems your students field is nested under data, so you probably need to use data.students in your Item Lists node. Like so:

Let me know if you have any questions on this :slight_smile:

3 Likes

Thank you very much for your help. Everything is working.

Now if I wanted to redirect it further is the best way to use the switch?

Greetings and thanks again

1 Like

Yep, you could use a Switch node if you have more than 2 options, otherwise an IF node would do.

With a switch node following the Item Lists node the workflow could look like so:

Hi @MutedJam.

Thank you very much for your help.

It makes it easier for me to learn about n8n.

Greetings

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.