Using the Unifi Node and I need to understand how to filter a msg.payload please, for example filter the last five alarms/alerts. Thanks in advance for any guidance...
So in the Unifi UI it has Admin Admin username log in from 1.1.1.1 5:06 pm 09/25/2021 so I would like to reproduce the last 5 alerts in the same format.
Example Output
[[{"_id":"61319dae33f1aa1ff4a97c96","ip":"1.1.1.1","admin":"Admin[nameofuser]","site_id":"5dd35c62e9d29101752c640d","is_admin":true,"key":"EVT_AD_Login","subsystem":"","time":1630641582993,"datetime":"2021-09-03T03:59:42Z","msg":"Admin[nameofuser] log in from 1.1.1.1"},{"_id":"61319dae33f1aa1ff4a97c95","ip":"1.1.1.1","admin":"Admin[nameofuser]","site_id":"5dd35c62e9d29101752c640d","is_admin":true,"key":"EVT_AD_Login","subsystem":"","time":1630641582891,"datetime":"2021-09-03T03:59:42Z","msg":"Admin[nameofuser] log in from 1.1.1.1"},{"_id":"61319dae33f1aa1ff4a97c94","ip":"1.1.1.1","admin":"Admin[nameofuser]","site_id":"5dd35c62e9d29101752c640d","is_admin":true,"key":"EVT_AD_Login","subsystem":"","time":1630641582864,"datetime":"2021-09-03T03:59:42Z","msg":"Admin[nameofuser] log in from 1.1.1.1"},{"_id":"61319d5a33f1aa1ff4a97c93","ip":"1.1.1.1","admin":"Admin[nameofuser]","site_id":"5dd35c62e9d29101752c640d","is_admin":true,"key":"EVT_AD_Login","...