I use javascript to get response data from firebase result. Now I have list item respone like
Luxury
Sedan
MPV
Hatchback
SUV
Luxury
Luxury
Luxury
Luxury
Now I want to display this respone on HTML, but no have duplicate more name luxury.
I try to use
var uniqueNames = [];
$.each(names, function(i, el){
if($.inArray(el, uniqueNames) === -1) uniqueNames.push(el);
});
With names
is my list respone, but it not a array. What I wrong in here, please help me to find a way to fix it
Thanks a lot
you can follow data this image link image response here