Eu tenho o documento JSON abaixo da API REST do Junos. Estou tentando simplificar o documento para apenas alguns itens selecionados. Como eu conseguiria isso?
JSON esperado:
[
{ "status": .member-status[0].data,
"serial": .member-serial-number[0].data,
"slot": .fpc-slot[0].data
},
...
]
JSON original:
{
"member-status": [
{
"data": "Prsnt"
}
],
"member-id": [
{
"data": "0"
}
],
"fpc-slot": [
{
"data": "(FPC 0)"
}
],
"member-serial-number": [
{
"data": "serNo1"
}
],
"member-model": [
{
"data": "ex4400-24t"
}
],
"member-priority": [
{
"data": "255"
}
],
"member-mixed-mode": [
{
"data": "N"
}
],
"member-route-mode": [
{
"data": "VC"
}
],
"member-role": [
{
"data": "Master*"
}
],
"neighbor-list": [
{}
]
}
{
"member-status": [
{
"data": "NotPrsnt"
}
],
"member-id": [
{
"data": "1"
}
],
"fpc-slot": [
{
"data": "(FPC 1)"
}
],
"member-serial-number": [
{
"data": "serNo2"
}
],
"member-model": [
{}
]
}