Given one object (“netto”) specifying which properties from another object (“brutto”) should be extracted into a new resulting object:
{
"brutto": {
"a": "AAA",
"b": "BBB", // Excluded from the result as "netto" doesn't include "b"
"c": "CCC"
},
"netto": {
"a": true,
"c": true
}
}
When: Some JsonPath expression checking which field names in “brutto” are also present in “netto”
Then:
{
"a": "AAA",
"c": "CCC"
}
Is it possible to do the with JsonPath and if so – what would the JsonPath (Jayway) expression look like?