1

I have the following function:

 $scope.save = function() {       
    var promise = Kinvey.DataStore.get('books','5631713ddc168ca90f0202b6');
    console.log(promise);

Here's the console.log:

d {$$state: Object}
$$state: Object
pending: undefined
processScheduled: false
status: 1
value: Object
_acl: Object
_id: "5631713ddc168ca90f0202b6"
_kmd: Object
password: "teste"
teste: "teste"
username: "testeasdf"
__proto__: Object  

How can I get the "password", "teste" and "username" value?

S_A
  • 411
  • 1
  • 7
  • 25

1 Answers1

0

Try this:

Kinvey.DataStore.get('books', '5631713ddc168ca90f0202b6', function (response) {
    console.log(response.password)
});

Or:

var promise = Kinvey.DataStore.get('books','5631713ddc168ca90f0202b6');
promise.then(function(response) {
    console.log(response.password)
});
michelem
  • 14,430
  • 5
  • 50
  • 66