Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to return Nested null objects #104

Open
khkassem opened this issue Mar 24, 2020 · 0 comments
Open

How to return Nested null objects #104

khkassem opened this issue Mar 24, 2020 · 0 comments

Comments

@khkassem
Copy link

khkassem commented Mar 24, 2020

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [ ] Bug report -> please search issues before submitting
- [* ] Feature request
- [ ] Documentation issue or request

Hello,

This is related to #67,

import { Component } from '@angular/core';

import { FilterPipe } from 'ngx-filter-pipe';

@Component({
  selector: 'my-app',
  templateUrl: './app.component.html',
  styleUrls: [ './app.component.css' ]
})
export class AppComponent  {
  issues: any[] = [{ title: 'issue1', user: {name: 'user1', email: 'email@exemple.com' }}, { title: 'issue2' ,user:null}];
  userFilter: any = {user:{email: 'email@exemple.com' }};

  constructor(private filterPipe: FilterPipe) {
    console.log(filterPipe.transform(this.issues, this.userFilter));
  }
}

Is there a way to modify userFilter so it return elements with user=null, in addition to users with the specified email?

I tried adding {user:null} with an $or key without success.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant