JSON schema: ensure a value references an array item

Viewed 61

Considering the following JSON object:

{
    "users": [
        {"id": "user1"},
        {"id": "user2"}
    ],
    "selected": "user1"
}

Is there a way with JSON schema to ensure that the value of the selected property is the id of one of the array items?

1 Answers

Sorry. You cannot do this using JSON Schema.

Related