subscribeQueryPostsByUsernameAndCategory(username: string, category: string) {
return this.af.database.list('posts', {
query: {
orderByChild: 'username',
equalTo: username,
}
});
Now each post object has a username and a category property. I want to be able to get all the posts of a specific username and category.
How can I either had a filter for the category or just assign the return to a variable and do some kind of loop to check the property before returning?
Thanks