I'm quite new to programming.
My use case : I want to find elements that matches this criteria (refer code sample below) as well as elements that doesn't match the criteria and store them in 2 separate variables. Is there any simple methods to do it?
Also I am not able find elements that returns false here. Can someone help me with this.
posts = response.data.posts.filter((m) =>
m.post.toLowerCase().includes(searchQuery.toLowerCase())
);