Please use prefavorites.push(new_item);/pre instead prefavorites.append(new_item);/pre
codereturn JSON.parse(localStorage.getItem("favorites"));/code
Hi Michael,
Field "favorites" in your collection stores a string, not an object. That is, you don't need code:codereturn JSON.parse(localStorage.getItem ("favorites"));/code
When you request the data from database you would need to take into account that it is a string you need to convert into the structure.
Hi Michael,
You don't have the object of service settings or it is not specified in service settings. The problem is that {database_url} doesn't exist. You need to define it as a parameter database_url or connect settings object, which specifies this parameter.
I sorry Katya,
I dont understand