Apr-26-2019, 02:25 PM
Hi ALl ,
Need your help in python code for the following output required. thanks in advance.
Source file:
[ { "Env" :"dit",
"id": 1,
"appId": "AP11232",
"health": true
},
{ "Env" :"dit",
"id": 2,
"appId": "AP11232",
"health": false
}
{
"Env" :"int",
"id": 1,
"appId": "AP11232",
"health": true
},
{
"Env" :"int",
"id": 2,
"appId": "AP11232",
"health": true
},
{
"Env" :"int",
"id": 3,
"appId": "AP11232",
"health": true
},
{
"Env" :"int",
"id": 4,
"appId": "AP11232",
"health": true
}
]
Output Required:
{
"dit": [
{
"id": 1,
"appId": "AP11232",
"health": true
},
{
"id": 2,
"appId": "AP11232",
"health": false
}
],
"int":[
{
"id": 1,
"appId": "AP11232",
"health": true
},
{
"id": 2,
"appId": "AP11232",
"health": true
},
{
"id": 3,
"appId": "AP11232",
"health": true
},
{
"id": 4,
"appId": "AP11232",
"health": true
}]
}
Need your help in python code for the following output required. thanks in advance.
Source file:
[ { "Env" :"dit",
"id": 1,
"appId": "AP11232",
"health": true
},
{ "Env" :"dit",
"id": 2,
"appId": "AP11232",
"health": false
}
{
"Env" :"int",
"id": 1,
"appId": "AP11232",
"health": true
},
{
"Env" :"int",
"id": 2,
"appId": "AP11232",
"health": true
},
{
"Env" :"int",
"id": 3,
"appId": "AP11232",
"health": true
},
{
"Env" :"int",
"id": 4,
"appId": "AP11232",
"health": true
}
]
Output Required:
{
"dit": [
{
"id": 1,
"appId": "AP11232",
"health": true
},
{
"id": 2,
"appId": "AP11232",
"health": false
}
],
"int":[
{
"id": 1,
"appId": "AP11232",
"health": true
},
{
"id": 2,
"appId": "AP11232",
"health": true
},
{
"id": 3,
"appId": "AP11232",
"health": true
},
{
"id": 4,
"appId": "AP11232",
"health": true
}]
}