Hello all, nice to meet you.
Im new to flow, coming from ansible. Love flow and its capabilities but i have hit a snag, im hoping someone can help me.
I dont expect a finished solution, but i would be grateful for any help as im busting my brain with this for past couple of days and cant get it to work.
I have a JSON like so with thousands of entries, this one is truncated for convinicence:
[
{
"networkId": "N_566327XXX1874625",
"serial": "Q2TN-XXXX-CW29",
"uplink": "wan1",
"ip": "8.8.8.8",
"timeSeries": [
{
"ts": "2021-01-14T15:08:47Z",
"lossPercent": 0.0,
"latencyMs": 27.7
}
]
},
{
"networkId": "N_56632XXXX141874660",
"serial": "Q2TN-XXXX-35S4",
"uplink": "wan1",
"ip": "8.8.8.8",
"timeSeries": [
{
"ts": "2021-01-14T15:08:55Z",
"lossPercent": 0.0,
"latencyMs": 4.8
}
]
}
]
Im trying to first filter out all entries that have lossPercent not equal to 0 or 100
And in the end end up with something like:
[
{
"serial": "Q2TN-XXXX-35S4"
"lossPercent": 9
"latencyMs": 4.8
},
{
"serial": "Q2TN-YYY-35S4"
"lossPercent": 5
"latencyMs": 4.8
}
]
I understand i have to use looping and filter array, but just cant seem to get it right.
Not sure how to "get to" the item lossPercent so far deep in 😄
Appreciate any pointers, all.