pouchdb-react-native icon indicating copy to clipboard operation
pouchdb-react-native copied to clipboard

Dump docs got from database

Open to175 opened this issue 7 years ago • 0 comments

Hello, I use PouchDB like that : export const getItemsList = async () => { try { var docs = await local_database.allDocs({ include_docs: true, attachments: true }); return docs; } catch (err) { return false; } }

And I try to print {list} with this : this.state = {list : getRetailersList()};

However when I do console.error(list) I see [Object object] but I cannot read the object ! If I do a loop through it I can just retrieve thing like "_65" or "_40" which I don't know what it is , this is not the items I have put in the db...

I have put this : var doc1 = { _id: "1", place: "Paris", type: "reparator", } var doc2 = { _id: "2", place: "Los Angeles", type: "reseller" }

How to print the list of items please ?

to175 avatar Sep 05 '18 10:09 to175