Question / Issue
I am trying to filter my project so that I only get the ones where the boolean value, "isHome" is true.
I know about the client's getAllByType("{customtype}"), but I don't fully understand how to use the filter function.
I am trying to filter my project so that I only get the ones where the boolean value, "isHome" is true.
I know about the client's getAllByType("{customtype}"), but I don't fully understand how to use the filter function.
Hi @quentingibson94,
I'll be happy to help you out with this. Can you elaborate a little on what you're trying to do, i. e. where is the filter, what is it filtering, what are you trying to display and where, etc. Any detail helps giving you an answer that'll fit what you need
Hi @quentingibson94,
Could you try with this, and let me know if it works?
const pages = await client.getAllByType("page", {
predicates: [
prismic.filter.at("my.page.isHome", true)
],
});