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
3 days agoLouisa
8 days agoLucina
14 days agoMinna
19 days agoMalcom
24 days agoNana
29 days agoDulce
1 month agoLouvenia
1 month agoChau
1 month agoRenato
2 months agoLajuana
2 months agoGregoria
2 months ago