Filter the data like excel using javascript