I have a simple CSV file with two fields. One is a string and the other is an array being the elements of the name.
"John Citizen", "[John, Citizen]"
When I import this into Firestore the second field is stored as a string and not parsed as an array.
How can I import these fields as String and Array?
db.collection('people').add({
name: record.name,
elements: record.elements
})
.then(function(docRef) {
console.log("Document written with ID: ", docRef.id);
})
.catch(function(error) {
console.error("Error adding document: ", error);
});