Is there a way to display only some data from a nested property in a JSON SQL query? Such as:
[{
// name of user
name: 'Sarah',
age: 24,
/* list of roles user owns
note that user can have multiple roles */
roles: [
{ id: 1, name: 'Engineer' },
{ id: 2, name: 'Admin' },
],
}]