This is input:
<input type="text" class="form-control" id="name" maxlength="10" required placeholder="Enter Username">
And this is Javascript:
contactsRef.child("users/" + auth.uid + "/moath")
.set({ a1: $('#name').val(),})
In JavaScript i have /moath I don't want it.
But I want to set child name from input
I have tried this:
contactsRef.child("users/" + auth.uid + "/('#name')")
.set({ a1: $('#name').val(), })
I've looked at this too but it wasn't helpful How do I set the name a child in Firebase to user input from a text field?
Finally this is I want

