I have a bunch of data in the requests json object. By default, all data is displayed to the user. In addition, I have a slider component. I am trying to make such functionality that when the user moves the slider, the json elements appear / disappear depending on the value of the slider.
For example:
Data:
requests: [ {value: 10, name: "foo"}, {value: 12, name: "bar"}, {value: 14, name: "foobar"}, {value: 22, name: "test"}, {value: 1, name: "testtooo"}, {value: 8, name: "something"} ]
By default, I want all the data to be displayed, but when the user moves the slider, I only need data that has a value greater than the current value of the slider.
I created JS Fiddle here: https://jsfiddle.net/hvb9hvog/9/
Question
How can I change json requests based on slider value?
Anthony
source share