const articles = [
{title: 'title 1', published: false, pages: 30, tags: {name: 'work', id: 1, visibility: "everyone"}},
{title: 'title 2', published: false, pages: 25, tags: {name: 'home', id: 3, visibility: "myself"}},
{title: 'title 3', published: true, pages: 30, tags: {name: 'vacation', id: 5, visibility: "myself"}}
];
My JSON data looks something like this and I need to filter based on the value where published
is true and visibility
is myself. How can I achieve this in efficient manner? Would appreciate any help with this.
So far I have only been able to filter using single attribute
R.filter(R.propEq("published", false))(articles);