mirror of
https://github.com/appy-one/acebase.git
synced 2026-05-25 06:02:14 -06:00
[GH-ISSUE #62] Filter on nested data #46
Labels
No labels
IndexedDB
browser
bug
dependencies
documentation
duplicate
enhancement
feature request
indexes
indexes
invalid
pull-request
query
question
transaction logging
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/acebase#46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gryphonmyers on GitHub (Jan 30, 2022).
Original GitHub issue: https://github.com/appy-one/acebase/issues/62
After reading through the docs, it seems there may not be a way to filter on nested data. For example, let's say I have a collection of items that looks like:
Can I perform a query for only the first entry based on the fact that it has a
bluenestedObject? Based on the docs that should look something like:But I don't think this works because the first argument of filter is described as a "key" not an object notation path. Is there something I'm missing or is this really not possible? Are there plans to support this type of query?
@appy-one commented on GitHub (Jan 30, 2022):
This is possible. Use
filter('nestedObject/color', 'like', 'blue')instead. I see I didn't document that. Note that the collection in your example is an array, not a collection. See this example code: