I’m trying to create a filter to get the warnings only if the occurrence is 5 in a consecutive way.
For below history, filter should not do anything. As ‘status 1’ is not 5 consecutively.
{
“history”: [
{
“status”: 1,
“executed”: 1644847740
},
{
“status”: 1,
“executed”: 1644847755
},
{
“status”: 1,
“executed”: 1644847770
},
{
“status”: 2,
“executed”: 1644847785
},
{
“status”: 1,
“executed”: 1644847800
}
]
}
Only below scenario should qualify the filter.
{
“history”: [
{
“status”: 1,
“executed”: 1644847740
},
{
“status”: 1,
“executed”: 1644847755
},
{
“status”: 1,
“executed”: 1644847770
},
{
“status”: 1,
“executed”: 1644847785
},
{
“status”: 1,
“executed”: 1644847800
}
]
}