Leaflet draw/filter

I have loaded a geoJSON layer that is a features collection into a leaflet map. I want to draw a rectangle on the map and I want all of the features intersecting the rectangle to be selected while features outside the rectangle disappear. Could someone point me to what I need to accomplish this task?

A quick google found this