I currently have a params object structured as shown below:
{
"application_context": {
"application_id": "a0",
"context_id": "c0"
},
"device_data": {
"device_id": "",
"hostname": ""
},
"query_options": {
"page_token": "",
"page_size": 30
}
}
The object I aim to achieve is as follows:
{
"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 implemented the following code snippet:
param['filter_list'] = [{
'operator': 'OPERATOR_AND',
'field_list': filter
}];
This section adds the specified logic:
"field": "State",
"value": "INACTIVE_STATE"
However, I am encountering difficulty in integrating it to complete my desired object structure.