i want to create a filter pipe, which i can filter by number, because I will use it to filter by salary. I created the filter for string characters, but I don't know how it would be with numbers, because I'm new in this.
here is my pipe
import { Pipe, PipeTransform } from '@angular/core';
import { Jobs } from '../interfaces/jobs.interface';
@Pipe({
name: 'filterSalary'
})
export class FilterSalaryPipe implements PipeTransform {
transform(value: Array<Jobs>, arg: any): any {
const resultPosts = [];
for (const jobs of value) {
if (jobs.salary.indexOf(arg) > -1) {
resultPosts.push(jobs);
};
};
return resultPosts;
}
}
in the jobs.salary what method, am i supposed to use?