How can I pass data to a post request?

Hi,

How may I pass article._id in my post request?
In the code below I tried to pass article._id from the loop but it returns null …
Thank you for your help :slight_smile:
async readPosts(depart){
try{
let reads = document.getElementById(${depart});
reads.classList.add(‘d-none’);
for(let article of this.getArticlesByDepartment(${depart})){
console.log(article._id);
console.log(article);

                await this.$store.dispatch('readPost', {
                    read : article._id
                });

            }
        }catch(error){
            console.log(error);
            
        }
        
    }

Hi there, please use syntax highlighting when posting code.

As for your issue, what does getArticlesByDepartment do? Can you show the code for this.