Skip to content

Constraint to verify elements of an array based on elements of second array, correclated by index of elements #604

Discussion options

You must be logged in to vote

You just need to move your if/then to the level of the "masterArray" items.

{
  "type": "object",
  "properties": {
    "masterArray": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": { ... },

        "$comment": "Your conditional would go at this level",
        "if": { ... },
        "then": { ... }
      }
    }
  }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@girish-tharwani
Comment options

Answer selected by girish-tharwani
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants