Skip to content

How to return Nested null objects #104

@khkassem

Description

@khkassem
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

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