Assuming I have this data format:
const matchedProperty = "property1"
const jsonObject = {
"property1": {
param1: '',
param2: '',
param3: '',
data: [
{key: value},
{key: value},
{key: value},
{key: value}
],
param4: ''
},
"propery2": {
param1: '',
param2: '',
param3: '',
data: [
{key: value},
{key: value},
{key: value},
{key: value}
],
param4: ''
}
}
How can I check if the property exists inside this json and after that how can I extract only data[{}] and param1 for example?
Can't think of something that would be helpful and working