-
Notifications
You must be signed in to change notification settings - Fork 482
Open
Description
Is there any query or method that I can get the correct order of array?
If I add an item, it should store as the last item in the array. But it's not working like that. ( Probably, it's only happen at me? )
Currently, I have to reorder the array by sorting the times like this
hoodie.store.findAll().then(function (data) {
data.sort((a,b)=>return b.createdAt - a.createdAt);
})
And one more question how do I get current username/data?
I try something like this and it just return promise.
var currentUsername = hoodie.account.get().then(function(e){
return e.username;
})
console.log(currentUsername);
Is there any easy way to get username as a string?
Probably something like this var currentUsername = hoddie.account.get('username')
;
Thanks in advance.
Metadata
Metadata
Assignees
Labels
No labels