Find all data starts with specific letter


#1

I want to know how can I find all data starts with specific letter
exemple:
name="you"
name="yaw"
name="yes"
thanks for help


#2
const someLetter = 'y';
const pattern = new RegExp(`^${someLetter}`);
const results = People.find({ name: pattern });

#3

thanks for help, your solution work too well