**Is the dynamic search parameter correctly set in the URL? Should I be using backticks or other syntax? I want to search for objects within a backend URL endpoint based on user input.
https://codesandbox.io/s/onscroll-izfjoc?file=/index.html**
people: [],
getAllProducts(searchInput) {
let searchUrl = searchInput;
fetch(`http://test.mosvesna.com/?search=${searchUrl}`)
.then((response) => response.json())
.then((res) => {
let local = this;
if (searchInput) {
this.people = res.filter((i) => i.name.toLowerCase().includes(searchInput.toLowerCase()));
} else {
this.people = res;
}
});
}