Alex Casajuana Alex Casajuana - 8 months ago 84
Javascript Question

Fuse.js library - Order results alphabetically

I'm using Kiro Risk's

to search a bunch of objects within an array. I don't know exactly how its algorythm works, but I can see that uses a score to sort the result list depending on the word match.

I looked if it had any property for these cases but does not. Fuse.js url:

Someone had been in the same situation and knows a trick, or should be better to get Fuse result and then pass it into another function to sort it alphabetically?


Okey, I just parsed the objects result and pushed to an array. Then I just used the javascript function sort() to sort it alphabetically.

result = result.sort();