JSON Array Filtering - Function Node

See this post from earlier today which asks an almost identical question. Filter Array of Objects

[Edit] Note that if you are using the filter function you have to call filter on the Array, which is msg.payload.trains, not msg.payload.CA_MSG, and you have to check for equality (at least I assume that is what you want) so the test is el.area_id === "RT")

[Edit] as pointed out below that should be el.CA_MSG.area_id