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!