178
rated 0 times
[
179]
[
1]
/ answers: 1 / hits: 46652
/ 12 Years ago, mon, august 6, 2012, 12:00:00
Possible Duplicate:
Array unique values
Get unique results from JSON array using jQuery
Im having a JSON string like this
[
Object { id=38,product=foo},
Object { id=38,product=foo},
Object { id=38,product=foo},
Object { id=39,product=bar},
Object { id=40,product=hello},
Object { id=40,product=hello}
]
There are duplicate values in this JSON array..how can i make this JSON array unique like this
[
Object { id=38,product=foo},
Object { id=39,product=bar},
Object { id=40,product=hello}
]
.Im looking for a suggestion that uses less iterations,
Jquery $.inArray
is not working in this case.
Suggestion to use any third party libraries are welcome.
More From » jquery