I use Firebase with Vue.js.
Here I save to the database with this command:
saveEvent(){
db.collection('events').add({
title: this.title,
content: this.content,
start: this.start,
end: this.end,
split: this.split,
})
this.events.push(this.data)
}
Everything is saved as string, but I would like to save ‘split’ as a number.
do you have any suggestions for solutions?
>Solution :
try doing split: Number(this.split) to cast a string into number.
