Removing duplicate objects from array

I have a ReactJS  application, which communicates with backend via REST api. To query the results through REST api and further operations with the data I rely on few libraries such as Lodash. Such libraries make developers life easier. Lodash adds functional programming flavor to the application too. There are many utility functions available through Lodash library, but, I am going to show you one such usage of a utility function which removes duplicate objects from the array.

Say, you got a JSON response as:

[{
"id": 1,
"name": "Yoga",
"code": "YOGA",
},
{
"id": 2,
"name": "Yoga",
"code": "YOGA",
},
{
"id": 3,
"name": "Zumba",
"code": "ZUMBA",
},
]
As you can see in the above mentioned JSON response that we have an object which is duplicate, i.e Yoga. How could be remove it using Lodash, simple, using uniqBy function.
let _ = require('lodash');
let results = [{
 "id": 1,
"name": "Yoga",
"code": "YOGA",
},
{
"id": 2,
"name": "Yoga",
"code": "YOGA",
},
{
"id": 2,
"name": "Zumba",
"code": "ZUMBA", 
},]

// uniqBy takes two arguments, one is the array and the other one

// is the id or array of id's to filter uniq with.

let filterResults = _.uniqBy(results, 'code')
console.log(filterResults)
Output:
[ { id: 1, name: 'Yoga', code: 'YOGA' },
  { id: 3, name: 'Zumba', code: 'ZUMBA' } ] 

You can try it out using online REPL here.