diff --git a/firestore.js b/firestore.js index dc5b7ac..aeefaad 100644 --- a/firestore.js +++ b/firestore.js @@ -131,7 +131,7 @@ module.exports = function(RED) { const querySnapshot = await query.get(); let results = []; querySnapshot.forEach((queryDocumentSnapshot) => { - results.push(queryDocumentSnapshot.data()); + results.push({id:queryDocumentSnapshot.id,data:queryDocumentSnapshot.data()}); }); msg.payload = results; @@ -174,4 +174,4 @@ module.exports = function(RED) { RED.nodes.registerType(NODE_TYPE, FireStoreNode); -}; \ No newline at end of file +};