Skip to content

[mongo2js] - Nested object match #33

@FranckBontemps

Description

@FranckBontemps

Hello,
Thank you for this very useful package.

I have a problem with a query supported within mongodb but not within the package.

const store = [{ foo: { bar: 'value' }}];
const predicate = guard({ foo: { bar: 'value' }} as any); // any to avoid typing error
const result = store.filter(predicate);

but it works with:

const store = [{ foo: { bar: 'value' }}];
const predicate = guard({ 'foo.bar': 'value' } );
const result = store.filter(predicate);

Result:
image

Is it easy to fix ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions