Okay so I was trying create a search function by passing the input value to my query, $contains must be the value of what the user puts in the input field.
const qs = require("qs");
const query = qs.stringify({
filters: {
$or: [
{
blogTitle: {
$contains: "",
},
},
{
blogContent: {
$contains: "",
},
},
],
},
encodeValuesOnly: true,
});
const data = await fetch(`http://localhost:1337/api/blogs?${query}`);
const newData = await data.json();