I am getting value from cloud firestore using the code below
dbManager = admin.initializeApp(functions.config().firebase);
this.dbManager.collection("test").doc("myTest").get().then( async test=> {
console.log("test---------------->",test);
console.log("test---------------->",test._fieldsProto['tests']);
console.log("test---data------------->",test.data()['tests'].values);
});
and the value I get when I use test.data()['tests']
is
{ values:
[ { mapValue: [Object], valueType: 'mapValue' },
{ mapValue: [Object], valueType: 'mapValue' },
{ mapValue: [Object], valueType: 'mapValue' },
{ mapValue: [Object], valueType: 'mapValue' },
{ mapValue: [Object], valueType: 'mapValue' },
{ mapValue: [Object], valueType: 'mapValue' },
{ mapValue: [Object], valueType: 'mapValue' },
{ mapValue: [Object], valueType: 'mapValue' },
{ mapValue: [Object], valueType: 'mapValue' } ] }
How do I get values from this? When I try with foreach like test.data()['tests'].array.forEach
it is not working.