Hey there, I'm new to this platform and my English isn't great, so apologies if I don't grasp all the nuances of my issue.
I have a question about why the findOneAndDelete() method in Mongoose is deleting all documents instead of just deleting a specific string in an array.
Here is the Mongoose document in my collection: document link
What I need exactly is to remove the string [.1]-uk from the array in my socketController (Node.js/Express.js Server) if that string matches the result value after conversion. Here is the server side code I've tried using findOneAndDelete({name: result}), but it either deletes the whole document or doesn't work at all with $pull.
Thank you in advance for any help!