Assume an object schema stored in ScriptDb:
{name: 'alice',
age: 12,
interests: [
{interest: 'tea parties', enthusiasm: 'high'},
{interest: 'croquet', enthusiasm: 'moderate'},
]
}
I understand how to query against the first two attributes but not how to run a query to return all rows where interests[enthusiasm = moderate]
Taking that example literally and trying: db.query({interests:[{enthusiasm: 'moderate'}]});
returns a ScriptDbResult but any attempt to use that result's methods results in an error:
Queries can only contain letters, numbers, spaces, dashes and underscores as keys.