How to use filters in Get Element node

Hey team,

I have a database in Latenode where I’m caching certain values from API responses… (in this instance a chart of accounts from Xero).

I’m trying to return this object ID specifically which has this specific database entry

This is what I’m trying to use in the filter… Not working. How could I go about doing this?

conditions:

  • operation: equal
    query:
    path: object_id
    expected:
    value: “08120157-4713-4c9e-bb49-f76cf1a60781”

Hey Dan

The core issue is that you’re trying to search inside the stored value by object_id, using path: object_id.
But in Latenode, object_id is the system identifier of the database record itself, not a field inside the stored JSON / array (for example, not inside value.accounts).

So you’re effectively trying to find an internal field that doesn’t exist — that’s why the filter doesn’t work.

The correct way to filter by the record ID is:

Correct (filter by system object ID):

conditions:
  - operation: equal
    query:
      field: object_id
    expected:
      value: "08120157-4713-4c9e-bb49-f76cf1a60781"

And if you always want to work with one specific record, it’s even simpler:

  • use Get object or Update object
  • and provide a static object_id of the record you want to work with

No collection filtering is needed in that case.

Also, you can work with the database directly from JavaScript, which might be more convenient depending on your logic and flow:
:backhand_index_pointing_right: Using Databases from JS Code

This approach gives you more flexibility when reading, updating, or managing cached data.

Awesome thanks Raian. Thought it might be something like that. Although I can’t find a Get object node?

Sorry, I mixed up the terms a bit - I’m referring to the get elements node here.

1 Like

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