I am trying to get the specific data by providing id to get method like this,
var person = [
{id:1,name:"abc"},
{id:2,name:"xyz"}
];
var detailsStore = new Memory([{data: person,idProperty:"id"}]);
And getting value like this,
var person = detailsStore.get(1);
person.then(function(data){
var data1 = data.name;
},function(err){
console.log(err);
});
But the promise object returned by "detailsStore.get(1)" does not have any object hence the argument data in the callback function is undefined. Why it is not returning object even data is present?