How can I check if a key field exists in nested JSON? For example I have a json like this,
  "Ticket": {
    "Price": {
      "Adult": "18",
      "Child": [{
        "FromAge": "0",
        "ToAge": "12",
        "Price": "10"
      }]
    }
  }
}
From source I might get the json as follows as well without one among the key fields (child missing).
  "Ticket": {
    "Price": {
      "Adult": "18"
      Â
    }
  }
}
In this case how can check if key field exists and if not I want to introduce "Child": [{
        "FromAge": "0",
        "ToAge": "12",
        "Price": "10"
      }] to the json to standardise the structure.
Â
How can I achieve this in StreamSets? If I couldn’t standardize, at least I want to identify the records with missing key in the json.
Â
Thanks!Â
Â




