Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.uniqe() feature for listing data #68

Open
mkucharz opened this issue Jul 14, 2017 · 2 comments
Open

.uniqe() feature for listing data #68

mkucharz opened this issue Jul 14, 2017 · 2 comments

Comments

@mkucharz
Copy link
Member

For example: .uniqe('name') will take only first unique record (by 'name' field)

@Idered
Copy link
Member

Idered commented Jul 14, 2017

Hmm, maybe this should be part of collections feature?

let sockets = data.sockets.list().then(sockets => 
  sockets.unique('name').sortBy('name')
)

data.sockets.list().then(sockets => 
  sockets.filter(item => item.name === 'malgun').update({name: 'mailgun'})
)

@Idered
Copy link
Member

Idered commented Aug 21, 2017

We could use https://github.com/ecrmnn/collect.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants