I am simply trying to store some data in my firebase realtime database, but when doing so I keep getting this error:
Paths must be non-empty strings and can't contain ".", "#", "$", "[", or "]"
The problem isn’t the data I want to store, but the name I want to give the path. I want the path-name to be an URL. But it obviously contains those "illegal" symbols.
This is how I try to name the path and store some data:
// URL example:
var newNote = firebase
.database()
.ref()
.child("/https://developer.mozilla.org/en
US/docs/Learn/JavaScript/First_steps/Strings") // <-- this is the problem
.set({
title: title,
icon: icon,
body: body,
url: url,
});
Any ideas on how to solve this?