I have two JSON objects and I want to check that one of them contains the other one (Object1 contains Object2)
Both JSON objects are dynamic - I don't know the structure or property names of either objects.
For example, Object1 can look like this:
{
"propertyA": "value1",
"propertyB": "value2",
"propertyC": {
"objProp1": "objVal1",
"objProp2": "objVal2"
}
"propertyD": [
{
"arrProp1": "arrVal1",
"arrProp2": "arrVal2"
},
{
"arrProp1": "arrVal3",
"arrProp2": "arrVal4",
}
]
}
While Object2 could be one of the following:
Option 1:
{
"propertyA": "value1",
"propertyD": [
{
"arrProp2": "arrVal4"
}
]
}
Option 2:
{
"objProp1": "objVal1"
}