is it possible to add json code to hide and show other rows based on column value?

am using view formatting with json wondering if its possible to add
button that can sort , hide and show other rows based on their column value, like only show items in toys department store and hide other departments sports etc