I have the following Structure:
_id: 'blog',
posts: [
{
_id: 'politics and economy',
name: 'politics and economy',
author: 'Mark',
},
{
_id: 'random',
name: 'random',
author: 'Michael'
}
]
My if Statement:
if(posts.name.includes("politics"){
//Doing Stuff
}
How Can I get this running? I do not know the length of the Array.