Why Object Fields are always undefined?

Describe the problem/error/question

Hello, I’m trying to filter data from NoCoDB. When I work with normal fields like;
{{ $json.user_removed }}
— everything is ok,

but when I use linked fields that are objects like:
{{ $json['testing_org (from Orgs)'][0] }} those fields are undefined. But I have them on my left preview panel:

What is the error message (if any)?

With Schema preview, I can see my data:
{{ $json[‘testing_org (from Orgs)’][0] }} = true

J

But with JSON preview, it’s empty:

As a result, none of my records are filtered.
Check my input data:

Input Json
[
  {
    "Id": 1,
    "name": "Kristofer Yender",
    "email": "[email protected]",
    "created": "2019-05-06 15:00:24+00:00",
    "updated": "2024-11-05 14:01:02+00:00",
    "last_activity": "2024-11-05 13:38:46+00:00",
    "last_login": "2024-10-23 13:50:00+00:00",
    "CreatedAt": "2024-11-06 18:11:03+00:00",
    "UpdatedAt": "2024-11-09 06:31:01+00:00",
    "last_organization_id": 0,
    "Org-Users_id": null,
    "user_removed": false,
    "lang": "en",
    "is_owner": false,
    "role": 3,
    "activ_email_3_days_before_trial_ends": false,
    "Org-Users": null,
    "name (from Orgs)": [],
    "Stage (from Orgs)": [],
    "trial_start (from Orgs)": [],
    "trial_end (from Orgs)": [],
    "org_removed (from Orgs)": [],
    "testing_org (from Orgs)": [],
    "Duplicate (from Orgs)": []
  },
  {
    "Id": 3,
    "name": "Yaosi",
    "email": "[email protected]",
    "created": "2019-05-06 15:00:37+00:00",
    "updated": "2024-11-07 13:01:02+00:00",
    "last_activity": "2024-11-07 12:56:52+00:00",
    "last_login": "2024-11-05 11:09:14+00:00",
    "CreatedAt": "2024-11-06 18:11:03+00:00",
    "UpdatedAt": "2024-11-09 06:31:01+00:00",
    "last_organization_id": 0,
    "Org-Users_id": null,
    "user_removed": false,
    "lang": "en",
    "is_owner": false,
    "role": 2,
    "activ_email_3_days_before_trial_ends": false,
    "Org-Users": null,
    "name (from Orgs)": [],
    "Stage (from Orgs)": [],
    "trial_start (from Orgs)": [],
    "trial_end (from Orgs)": [],
    "org_removed (from Orgs)": [],
    "testing_org (from Orgs)": [],
    "Duplicate (from Orgs)": []
  },
  {
    "Id": 4,
    "name": "Patrick",
    "email": "[email protected]",
    "created": "2019-05-06 15:00:37+00:00",
    "updated": "2024-11-02 18:01:02+00:00",
    "last_activity": "2024-11-02 17:19:28+00:00",
    "last_login": "2024-10-30 08:22:22+00:00",
    "CreatedAt": "2024-11-06 18:11:03+00:00",
    "UpdatedAt": "2024-11-09 06:31:01+00:00",
    "last_organization_id": 0,
    "Org-Users_id": null,
    "user_removed": false,
    "lang": "ru",
    "is_owner": false,
    "role": 3,
    "activ_email_3_days_before_trial_ends": false,
    "Org-Users": null,
    "name (from Orgs)": [],
    "Stage (from Orgs)": [],
    "trial_start (from Orgs)": [],
    "trial_end (from Orgs)": [],
    "org_removed (from Orgs)": [],
    "testing_org (from Orgs)": [],
    "Duplicate (from Orgs)": []
  },
  {
    "Id": 5,
    "name": "E Z",
    "email": "[email protected]",
    "created": "2019-05-06 15:00:37+00:00",
    "updated": "2024-10-04 09:50:16+00:00",
    "last_activity": "2024-07-21 11:59:06+00:00",
    "last_login": "2024-06-26 11:48:55+00:00",
    "CreatedAt": "2024-11-06 18:11:03+00:00",
    "UpdatedAt": "2024-11-09 06:31:00+00:00",
    "last_organization_id": 0,
    "Org-Users_id": null,
    "user_removed": false,
    "lang": "en",
    "is_owner": false,
    "role": 1,
    "activ_email_3_days_before_trial_ends": false,
    "Org-Users": null,
    "name (from Orgs)": [],
    "Stage (from Orgs)": [],
    "trial_start (from Orgs)": [],
    "trial_end (from Orgs)": [],
    "org_removed (from Orgs)": [],
    "testing_org (from Orgs)": [],
    "Duplicate (from Orgs)": []
  },
  {
    "Id": 6,
    "name": "Nadia",
    "email": "[email protected]",
    "created": "2019-05-06 15:00:37+00:00",
    "updated": "2024-11-09 06:01:02+00:00",
    "last_activity": "2024-11-09 05:57:07+00:00",
    "last_login": "2024-11-08 13:25:59+00:00",
    "CreatedAt": "2024-11-06 18:11:03+00:00",
    "UpdatedAt": "2024-11-09 06:31:09+00:00",
    "last_organization_id": 1,
    "Org-Users_id": null,
    "user_removed": false,
    "lang": "en",
    "is_owner": false,
    "role": 3,
    "activ_email_3_days_before_trial_ends": false,
    "Org-Users": null,
    "name (from Orgs)": [
      "Ducalis.io"
    ],
    "Stage (from Orgs)": [
      "Testing"
    ],
    "trial_start (from Orgs)": [
      null
    ],
    "trial_end (from Orgs)": [
      null
    ],
    "org_removed (from Orgs)": [
      false
    ],
    "testing_org (from Orgs)": [
      true
    ],
    "Duplicate (from Orgs)": [
      false
    ]
  },
  {
    "Id": 7,
    "name": "V",
    "email": "[email protected]",
    "created": "2019-05-06 15:00:37+00:00",
    "updated": "2024-11-08 16:01:02+00:00",
    "last_activity": "2024-11-08 15:17:07+00:00",
    "last_login": "2024-10-29 09:50:36+00:00",
    "CreatedAt": "2024-11-06 18:11:02+00:00",
    "UpdatedAt": "2024-11-09 06:31:09+00:00",
    "last_organization_id": 0,
    "Org-Users_id": null,
    "user_removed": false,
    "lang": "en",
    "is_owner": true,
    "role": 3,
    "activ_email_3_days_before_trial_ends": false,
    "Org-Users": null,
    "name (from Orgs)": [],
    "Stage (from Orgs)": [],
    "trial_start (from Orgs)": [],
    "trial_end (from Orgs)": [],
    "org_removed (from Orgs)": [],
    "testing_org (from Orgs)": [],
    "Duplicate (from Orgs)": []
  }
]

Please share your workflow

Share the output returned by the last node

Nothing filtered, nothing to share

Information on your n8n setup

  • n8n version: 1.66.0
  • Database (default: SQLite): sqlite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker (self-hosted)
  • Operating system:

hello @Vit_Mee

That happens because you have the correct data for the item 5 of 6. Other items do not have it

1 Like

Hi @barn4k, thanks for the quick reply :raised_hands:

Yes, but should it be the issue that sometimes my data is defined and occasionally undefined?
I found the workaround: if I divide my Filter ‘OR’ conditions into steps — everything works as I expected:

Before (check my first message workflow), I had a filter with multiple ‘OR’ conditions, and nothing was discarded:

After creating separate filters with one condition (check the updated workflow below) — it works:

I expected multiple filtering ‘OR’ conditions to work, like “if any of it’s true, a record should be filtered out.” Is that a valid assumption?

No, it works the opposite way :slight_smile:
If any conditions are met, the entry will be kept.
Your chain of filters works as AND criteria

2 Likes

Thanks for the clarification @barn4k :raised_hands:

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