JSON Schema: How to check that an array contains at least one object with a property with a given value?
问题 How can I check in the following json that at least one element in the array names has a property nickName with the value Ginny ? { "names": [ { "firstName": "Hermione", "lastName": "Granger" }, { "firstName": "Harry", "lastName": "Potter" }, { "firstName": "Ron", "lastName": "Weasley" }, { "firstName": "Ginevra", "lastName": "Weasley", "nickName": "Ginny" } ] } Currently I'm using the draft-06 version (FAQ here). This is my NOT WORKING schema: { "$schema": "http://json-schema.org/draft-06