1axios.get("api/blogs/" + this.state.pageIndex + "/10").then(res => {
2 res.filter(function(author) {
3 return author.firstName === this.state.query;
4 });
5});
6
1// Will return all the posts that belong to the first user
2fetch('https://jsonplaceholder.typicode.com/posts?userId=1')
3 .then(response => response.json())
4 .then(json => console.log(json))