I'm trying to remove a map item from an array in firebase. From what I understand with firebase - you are unable to delete the item based on the index. Should I structure this a different way or is there an easier way to remove a specific object from the array? Thank you
Error: 'No document to update: '
const listingRef = doc(db, 'users', 'savedListings');
const deleteListing = async () => {
try {
await updateDoc(listingRef, {
savedListings: deleteField()
});
} catch (e) {
console.log(e.message);
}
};```
