I have an existing params object as following
{
"application_context": {
"application_id": "a0",
"context_id": "c0"
},
"device_data": {
"device_id": "",
"hostname": ""
},
"query_options": {
"page_token": "",
"page_size": 30
}
}
My desired object should be following
{
"application_context": {
"application_id": "a0",
"context_id": "c0"
},
"device_data": {
"device_id": "",
"hostname": ""
},
"query_options": {
"page_token": "",
"page_size": 30,
"filter_list": [{
"operator": "OPERATOR_AND",
"field_list": [{
"field": "State",
"value": "INACTIVE_STATE"
}]
}]
}
}
I have created the following
param['filter_list'] = [{
'operator': 'OPERATOR_AND',
'field_list': filter
}];
where it's adding the following part with some logic
"field": "State",
"value": "INACTIVE_STATE"
But not able to add the above to get my complete object