I have this data:
{ moteid: 'AA:11',
temperature: '32',
humidity: '17.0',
readingDate: 2017-03-12T14:12:00.000Z,
_id: 5940221b2c4e2c63974609af }
Which I get by doing the following:
result.forEach(function(entries) {
console.log(entries);
})
How can I get the field names (i.e.: moteid, temperature, humidity, readingDate) in runtime to an array?
I want the field names so in the next steps I can use them as variables. I don't want the values, just the keys.
And I want the unique values, so if I have 100 records, I just want the key to be shwon once.