60
rated 0 times
[
67]
[
7]
/ answers: 1 / hits: 11127
/ 10 Years ago, tue, may 20, 2014, 12:00:00
I want to filter price range between 250 to 800 in JSON Data
My JSON Data :
var data = [{
name: Lenovo Thinkpad 41A4298,
Price: 200
}, {
name: Lenovo Thinkpad 41A2222,
Price: 200
}, {
name: Lenovo Thinkpad 41Awww33,
Price: 6700
}, {
name: Lenovo Thinkpad 41A424448,
Price: 600
}, {
name: Lenovo Thinkpad 41A429rr8,
Price: 4200
}, {
name: Lenovo Thinkpad 41A429ff8,
Price: 2200
}, {
name: Lenovo Thinkpad 41A429ss8,
Price: 200
}, {
name: Lenovo Thinkpad 41A429sg8,
Price: 500
}];
How to do in Javascript or jquery for Price range filter with All browser compatibility
I am try this code :
newdata=data.filter(function (el) {
return el.Price >= 250 &&
e1.Price <=800;
});
More From » jquery