Parse json array without an object name?

Describe the issue/error/question

I am unable to split out a json array because the object has no name

What is the error message (if any)?

Please share the workflow

  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        -540,
        140
      ]
    },
    {
      "parameters": {
        "authentication": "headerAuth",
        "url": "https://demo624b07fe121ef.breezechms.com/api/people?details=1&limit=3",
        "options": {}
      },
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 1,
      "position": [
        -200,
        140
      ],
      "credentials": {
        "httpHeaderAuth": {
          "id": "12",
          "name": "Header Auth account"
        }
      }
    },
    {
      "parameters": {
        "fieldToSplitOut": "=",
        "options": {}
      },
      "name": "Item Lists",
      "type": "n8n-nodes-base.itemLists",
      "typeVersion": 1,
      "position": [
        20,
        140
      ]
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Item Lists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Share the output returned by the last node

[
[
{
“id”: “39781962”,
“first_name”: “Kate”,
“force_first_name”: “Kate”,
“last_name”: “Austen”,
“nick_name”: “”,
“middle_name”: “”,
“maiden_name”: “”,
“path”: “img/profiles/upload/5b743818d7771.jpg”,
“details”: {
“234108349”: {
“value”: “1”,
“name”: “Single”
},
“559015668”: {
“value”: “1”,
“name”: “Member”
},
“746376853”: {
“value”: “3”,
“name”: “East”
},
“1110946074”: {
“value”: “2”,
“name”: “Female”
},
“1406704165”: [
{
“address”: “[email protected]”,
“is_primary”: “1”,
“allow_bulk”: “1”,
“is_private”: “0”,
“field_type”: “email_primary”
}
],
“1740739937”: [
{
“field_type”: “address_primary”,
“street_address”: “11 Sheldon Ave NE”,
“city”: “Grand Rapids”,
“state”: “MI”,
“zip”: “49503”,
“longitude”: “-85.667174”,
“latitude”: “42.963711”,
“is_primary”: “1”,
“is_private”: “0”
}
],
“2031800933”: “2002”,
“2108132646”: “1984-08-21”,
“2131996114”: [
{
“field_type”: “phone”,
“phone_number”: “(616) 555-5555”,
“phone_type”: “mobile”,
“do_not_text”: “0”,
“is_private”: “0”,
“people_meta_id”: “853897548”
},
{
“field_type”: “phone”,
“phone_number”: “(616) 555-5555”,
“phone_type”: “home”,
“do_not_text”: “0”,
“is_private”: “0”,
“people_meta_id”: “853897550”
},
{
“field_type”: “phone”,
“phone_number”: “555-5555”,
“phone_type”: “work”,
“do_not_text”: “0”,
“is_private”: “0”,
“people_meta_id”: “853897552”
}
],
“2133827013”: “$ITRunner”,
“person_id”: “39781962”,
“birthdate”: “1984-08-21”,
“grade”: “2002”,
“single_line”: “$ITRunner”
},
“family”: []
},
{
“id”: “39781964”,
“first_name”: “Frodo”,
“force_first_name”: “Frodo”,
“last_name”: “Baggins”,
“nick_name”: “”,
“middle_name”: “”,
“maiden_name”: “”,
“path”: “img/profiles/upload/5b743838579ba.jpg”,
“details”: {
“234108349”: {
“value”: “1”,
“name”: “Single”
},
“559015668”: {
“value”: “1”,
“name”: “Member”
},
“746376853”: {
“value”: “3”,
“name”: “East”
},
“1110946074”: {
“value”: “1”,
“name”: “Male”
},
“1406704165”: [
{
“address”: “[email protected]”,
“is_primary”: “1”,
“allow_bulk”: “1”,
“is_private”: “0”,
“field_type”: “email_primary”
}
],
“1740739937”: [
{
“field_type”: “address_primary”,
“street_address”: “130 W Fulton St.”,
“city”: “Grand Rapids”,
“state”: “MI”,
“zip”: “49503”,
“longitude”: “-85.671544”,
“latitude”: “42.9621”,
“is_primary”: “1”,
“is_private”: “0”
}
],
“2031800933”: “2008”,
“2108132646”: “1990-04-17”,
“2131996114”: [
{
“field_type”: “phone”,
“phone_number”: “(616) 555-5555”,
“phone_type”: “mobile”,
“do_not_text”: “0”,
“is_private”: “0”,
“people_meta_id”: “853897570”
},
{
“field_type”: “phone”,
“phone_number”: “(616) 555-5555”,
“phone_type”: “home”,
“do_not_text”: “0”,
“is_private”: “0”,
“people_meta_id”: “853897572”
},
{
“field_type”: “phone”,
“phone_number”: “555-5555”,
“phone_type”: “work”,
“do_not_text”: “0”,
“is_private”: “0”,
“people_meta_id”: “853897574”
}
],
“person_id”: “39781964”,
“birthdate”: “1990-04-17”,
“grade”: “2008”
},
“family”: []
},
{
“id”: “39782000”,
“first_name”: “Alison”,
“force_first_name”: “Alison”,
“last_name”: “Bourne”,
“nick_name”: “”,
“middle_name”: “”,
“maiden_name”: “”,
“path”: “img/profiles/upload/5b74386da9c04.jpg”,
“details”: {
“234108349”: {
“value”: “1”,
“name”: “Single”
},
“559015668”: {
“value”: “1”,
“name”: “Member”
},
“746376853”: {
“value”: “1”,
“name”: “North”
},
“1110946074”: {
“value”: “2”,
“name”: “Female”
},
“1740739937”: [
{
“field_type”: “address_primary”,
“street_address”: “1337 Breton Rd SE”,
“city”: “Grand Rapids”,
“state”: “MI”,
“zip”: “49506”,
“longitude”: “-85.610483”,
“latitude”: “42.93866”,
“is_primary”: “1”,
“is_private”: “0”
}
],
“2031800933”: “2024”,
“2108132646”: “2006-01-22”,
“2131996114”: [
{
“field_type”: “phone”,
“phone_number”: “(616) 555-5555”,
“phone_type”: “mobile”,
“do_not_text”: “0”,
“is_private”: “0”,
“people_meta_id”: “853897978”
},
{
“field_type”: “phone”,
“phone_number”: “(616) 555-5555”,
“phone_type”: “home”,
“do_not_text”: “0”,
“is_private”: “0”,
“people_meta_id”: “853897980”
},
{
“field_type”: “phone”,
“phone_number”: “555-5555”,
“phone_type”: “work”,
“do_not_text”: “0”,
“is_private”: “0”,
“people_meta_id”: “853897982”
}
],
“person_id”: “39782000”,
“birthdate”: “2006-01-22”,
“grade”: “2024”
},
“family”: [
{
“id”: “20887734”,
“oid”: “176344”,
“person_id”: “39781996”,
“family_id”: “7538108”,
“family_role_id”: “3”,
“created_on”: “2022-04-04 11:00:24”,
“role_name”: “Adult”,
“role_id”: “3”,
“order”: “3”,
“details”: {
“id”: “39781996”,
“first_name”: “Jason”,
“force_first_name”: “Jason”,
“last_name”: “Bourne”,
“thumb_path”: “img/profiles/upload/thumbnails/5b74388d79ccc.jpg”,
“path”: “img/profiles/upload/5b74388d79ccc.jpg”
}
},
{
“id”: “20887736”,
“oid”: “176344”,
“person_id”: “39781998”,
“family_id”: “7538108”,
“family_role_id”: “3”,
“created_on”: “2022-04-04 11:00:24”,
“role_name”: “Adult”,
“role_id”: “3”,
“order”: “3”,
“details”: {
“id”: “39781998”,
“first_name”: “Marie”,
“force_first_name”: “Marie”,
“last_name”: “Bourne”,
“thumb_path”: “img/profiles/upload/thumbnails/5b7438ab7a755.jpg”,
“path”: “img/profiles/upload/5b7438ab7a755.jpg”
}
},
{
“id”: “20887738”,
“oid”: “176344”,
“person_id”: “39782000”,
“family_id”: “7538108”,
“family_role_id”: “2”,
“created_on”: “2022-04-04 11:00:24”,
“role_name”: “Child”,
“role_id”: “2”,
“order”: “4”,
“details”: {
“id”: “39782000”,
“first_name”: “Alison”,
“force_first_name”: “Alison”,
“last_name”: “Bourne”,
“thumb_path”: “img/profiles/upload/thumbnails/5b74386da9c04.jpg”,
“path”: “img/profiles/upload/5b74386da9c04.jpg”
}
}
]
}
]
]

Information on your n8n setup

  • n8n version: 0.166.0
  • Database you’re using (default: SQLite): SQLite
  • **Running n8n with the execution process [own(default), main]:**main
  • **Running n8n via [Docker, npm, n8n.cloud, desktop app]:**Docker
    ````Preformatted text`
    type or paste code here
    {
    “nodes”: [
    {
    “parameters”: {},
    “name”: “Start”,
    “type”: “n8n-nodes-base.start”,
    “typeVersion”: 1,
    “position”: [
    -540,
    140
    ]
    },
    {
    “parameters”: {
    “authentication”: “headerAuth”,
    “url”: “https://demo624b07fe121ef.breezechms.com/api/people?details=1&limit=3”,
    “options”: {}
    },
    “name”: “HTTP Request”,
    “type”: “n8n-nodes-base.httpRequest”,
    “typeVersion”: 1,
    “position”: [
    -200,
    140
    ],
    “credentials”: {
    “httpHeaderAuth”: {
    “id”: “12”,
    “name”: “Header Auth account”
    }
    }
    },
    {
    “parameters”: {
    “fieldToSplitOut”: “=”,
    “options”: {}
    },
    “name”: “Item Lists”,
    “type”: “n8n-nodes-base.itemLists”,
    “typeVersion”: 1,
    “position”: [
    20,
    140
    ]
    }
    ],
    “connections”: {
    “Start”: {
    “main”: [
    [
    {
    “node”: “HTTP Request”,
    “type”: “main”,
    “index”: 0
    }
    ]
    ]
    },
    “HTTP Request”: {
    “main”: [
    [
    {
    “node”: “Item Lists”,
    “type”: “main”,
    “index”: 0
    }
    ]
    ]
    }
    }
    }

Hey @itpastor, I think you can solve this by enabling the Split Into Items option of your HTTP Request node and wouldn’t need the Item Lists node at all in this case:

Could you give this a go and let me know if you’re still having trouble afterwards?

1 Like

Thanks - that worked,and I figured out the other part!

2 Likes

Glad to hear, thanks so much for confirming!

1 Like