In postman flow i created a chain where I assign variables from my GET request in order to use them in my next POST request
A sample of the POST body request:
{
"metadata": {
"configurationVersions": [
7
],
"clusterVersion": "1.226.116.20211006-093312"
},
"id": "f0ec694c-c89e-4735-8821-5f082c522ecf",
"name": "Host",
"description": null,
"rules": [
{
"type": "HOST",
"enabled": true,
"valueFormat": null,
"propagationTypes": [],
"conditions": [
{
"key": {
"attribute": "HOST_OS_TYPE",
"type": "STATIC"
},
"comparisonInfo": {
"type": "OS_TYPE",
"operator": "EXISTS",
"value": null,
"negate": false
}
}
]
}
],
"entitySelectorBasedRules": []
}
Variables assigned:
POST Pre-request Script:
POST body:
Requst Body:
How can I parse the rules and avoid the null value?