3

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.

1 Answer 1

2

This is not currently possible. It may be supported in a future update. The best you can do now is load all interests and loop through them yourself.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.