https://linen.dev logo
#help
Title
# help
a

Allen Vachon

11/20/2023, 4:32 PM
Newby here! I am writing my second JSON mapping and I need to know how to validate each element of an array. My first one was easy and working. Must have both keys ("key1" & "key2") and the value can be anything (could also have an example for a specific value for a key).
Copy code
"myArray": [
  {
    "Key1": "AnyValue",
    "Key2": "AnyValue"
  },
  {
    "Key1": "AnyValue",
    "Key2": "AnyValue"
  },
  {
    "Key1": "AnyValue"
  }
]
In my example, the first two elements are valid but not the third one.
3 Views