Last active
November 6, 2020 11:50
-
-
Save ArtemRomanovsky/21a7f83dd70da7f437ccb6f6cdf5530a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const items = {}; | |
return {{result.data}}.map(item => { | |
return { | |
value: item.name, | |
title: item.name, | |
}; | |
}).filter(item => { | |
return items.hasOwnProperty(item.value) ? false : (items[item.value] = true); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment