Dynamically filtering tables

I would like to add buttons near a table to automatically set filters for the data in the table. When Button1 is clicked it would set the filter of the table to Status = 1, when Button2 is clicked it would set the filter to Status = 2, etc. I can see that these values are available. I can also see that a Javascript query is probably the right approach. I just don’t know how to set the filter values from Javascript. Has anyone done this?

Thank you!