Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Filter by nested fields

See original GitHub issue

Hi there!

I hope you are doing well! Every time I come back to this project, it’s awesome to see all the updates!

I am not sure if this is a feature request or already possible but I would like to filter a collection by nested fields. For example, I have an entity with the following fields in firebase:

config: {
  filters: {
    publish: true,
    free: false

Is there a way I could have a filter in the collection view such that I only see entities with config.filters.publish == true or false? Firestore supports querying by nested fields so it shouldn’t be an issue with firestore queries on that.

If it is not possible using the filterCombinations field in EntityCollection, is there a workaround; for instance, through a button in the extraActions component?

If this is not at all possible, will be great to have it in the future! 😃

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

joestephenscommented, Nov 30, 2022

I forgot to confirm on this one, but that worked a treat @fgatti675 - seems I was just trying the wrong combinations! Thank you very much for your assistance ❤️

fgatti675commented, Nov 4, 2022

I think there are a couple of things here. Firestore does not allow to have one filter set, and order by a different one, like you are doing here. ‘firstName’ and ‘tutor’ I can’t test this right now, but I think the syntax for the filter would be

  forceFilter: {
    "customClaims.tutor": ['==', true],
Read more comments on GitHub >

github_iconTop Results From Across the Web

In ElasticSearch, how do I filter the nested documents in my ...
This answer is wrong, for the simple reason that the _source field of the top-level hit will still include all the nested documents....
Read more >
Filtering nested objects - Kibana - Discuss the Elastic Stack
I'm wondering if there exists any mechanism that allows you to filter the array of nested objects and output specific fields
Read more >
Filtering a nested array of subdocuments without - MongoDB
I'd like to filter out the subdocuments in this nested array that have the field status: REMOVED, and then return the original document ......
Read more >
#28921 (On filtering nested many to many fields) – Django
Consider that related is a many to many field of Object. If you filter Object.objects.filter(related__a=1, related__b=2) a=1 and b=2 conditions apply to the ......
Read more >
Filtering Values In Nested Arrays In MongoDB - Spektor?.dev
In $filter operation a temporary internal variable reply is created on which conditional operator cond is invoked. $$reply.status is prefixed ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found