Q: Firebase Database won't allow a substring of user email I'm trying to write rules in firebase for an app I am making.  The way I have my data structured for my users is like this 
users
   -username (a substring of the users email)
       -all other data

where the username is a substring from the text before the period in an email address (for example, johnsmith@gmail.com's username would be johnsmith@gmail).  I am trying to write some rules based around this format, but I keep getting this error 
Error saving rules - Line 8: Key names can't contain ".", "#", "$", "/", "[", or "]" (unbound names start with "$")
This is the JSON code I am attempting to use for this rule
{
  "rules": {
    ".read":"auth.uid != null",
    ".write":false,
    "users": {
      "$substringBefore(auth.token.email,' ')": {
        ".write": true
      }
    }
  }
}

Can someone explain how I can get it to accept the users email substring for the username node?
