This is my data:
[ { url: \'www.example.com/hello\', id: \"22\" }, { u
Simply use _.uniqBy(). It creates duplicate-free version of an array.
This is a new way and available from 4.0.0 version.
_.uniqBy(data, 'id');
or
_.uniqBy(data, obj => obj.id);