In my angular app, after making a jsonp request to the search API, specifying that I want 25 results in the response object, I'm getting a lot of tracks with duplicate artistId
and hence artistName
. I want to keep the first object in the array, and delete the following repeated objects with the same artistID
attributes. Can I tell the API to return only unique values of artistID
? I've seen this question but the accepted answer seems dated.
Asked
Active
Viewed 124 times
1

Community
- 1
- 1

Rockstar5645
- 4,376
- 8
- 37
- 62
-
In what way is it dated? Have you tried it, I think you might have some success with it. – ZeroBased_IX Dec 24 '15 at 14:26
-
2The `unique` filter you see in the anwser you linked is available in angular-filter : https://github.com/a8m/angular-filter – Lauromine Dec 24 '15 at 14:30
-
@Lauromine I'm getting this error when I try to inject `'ui.filters'` into the app module. – Rockstar5645 Dec 24 '15 at 14:42
-
I've tried it, and it's not filtering out the results. – Rockstar5645 Dec 24 '15 at 14:47
-
it was a problem with the `property` I was specifying, in the filter. It's working now. – Rockstar5645 Dec 24 '15 at 14:50