Issue reading from database

I am trying to read data from a database using the ID that is generated by put. However, I can not pass this value and read that entry. If I take an ID and pass it, I will get the response. What am I doing wrong? And is there a way to have an ID specified to call a specific entry in the database? Code and response is below.

let response = new LS2Request().send({
service: ‘luna://com.palm.db/’,
method: ‘get’,
parameters: {
ids: [id]
},
onSuccess: function(inResponse){
console.log("get says "+JSON.stringify(inResponse));
},
onFailure: function(inError){
console.log("get did not work with “+inError.code+”: "+inError.text);
return;
}
});

get says {“returnValue”:true,“results”:}

Please refer to DB8 sample app. This app shows how to use DB8 in your app. Thank you.

1 Like