Javascript filter array of objects by object property value

I’m stumped here. I am trying to filter an array of objects down to just the objects that include a certain string in one of the object properties. The array is being passed into a javascript function in NodeRed, so I’m making a few assumptions on what the formatting of the array is. This is the output of my array:
Array output
I am looking for a way to filter the array down to only the objects whose “state” starts with the “Z_” prefix. The end result is to use the last entry, as I need the most recent “Z_” state and the array is ordered by timestamp. That said, I believe I need an array of the “Z_” states to then grab the last entry of, meaning I can’t use the “find” function or similar that identifies the first match. I also expect duplicate “Z_” values within multiple objects in the array, so I can’t rely on anything looking for unique values.

It seems to me that it would be best practice to accomplish this with the proper function, rather than with an iterating loop?

In filtering the above array, I expect the result to be an array of 2 entries, the “state”: “Z_Rain” and “Z_Blues” entry.

I have tried to use array.filter which resulted in a “TypeError: X.filter is not a function”. I believe this is due to the array being an array of objects, so I tried Object.values(array) to no avail. I also tried a fair few variations of X.filter() with > / => / etc. operators.