I'm not too familiar with MongoDB, but based on my understanding of the SQL query, I think option A looks like the right translation. The regex /John/ should match any authors that have "john" anywhere in their name.
Okay, let me think this through. The SQL query is using the LIKE operator to do a partial string match, so the MongoDB equivalent would be to use a regular expression. I'm leaning towards option A as the best fit.
I'm a bit confused by the different options here. The SQL query is looking for a partial match on the author field, so I'm not sure if the /John/ regex is the right approach. Maybe option D with the $like operator would be better?
An
10 days agoLouisa
15 days agoLucina
20 days agoMinna
25 days agoMalcom
1 month agoNana
1 month agoDulce
1 month agoLouvenia
2 months agoChau
2 months agoRenato
2 months agoLajuana
2 months agoGregoria
2 months ago