How do I construct the where clause to filter based on the properties inside an object field? For example, say I have a field "name" which stores an object like {"first": "xxx", "last": "xxx"}.
How can I search for all people whose name starts with "J"? (Jason, Jon, Jeffrey...)
This doesn't seem to be working:
where: {
name: {
first: {
$regex: "J"
}
}
}