Uncaught TypeError: something.parent is not a function
<p>Today, I was working on my website, and I got an issue from my code, with this : </p>

<pre><code>var ref = new Firebase('https://cryptobox.firebaseio.com/messages');
    // SHOW SELECTED MESSAGE ON SELECTOR
    function messageRead(uid) {
        var uid = uid.replace("#", "");
        if(uid != "") {
            ref.child(uid).once("value", function(snapshot) {
                message = snapshot.val();
                $(".email-content-body").text(message.message);
                $("#author").text(message.author)
                console.log(message)
                id = message.parent().name();
            });
        }
    }
    messageRead(window.location.hash);
});
</code></pre>

<p>On the firebase doc, the parent() function seems to be used like this, but, here, on the Chrome console, I got this error : </p>

<pre><code>firebase.js:47 Uncaught TypeError: message.parent is not a function
FIREBASE WARNING: Exception was thrown by user callback. TypeError: message.parent is not a function
    at http://localhost/crypt/js/main.js:55:18
    at c (https://cdn.firebase.com/js/client/2.2.1/firebase.js:218:65)
    at https://cdn.firebase.com/js/client/2.2.1/firebase.js:50:642
    at Ab (https://cdn.firebase.com/js/client/2.2.1/firebase.js:47:165)
    at wb (https://cdn.firebase.com/js/client/2.2.1/firebase.js:22:216)
    at xb (https://cdn.firebase.com/js/client/2.2.1/firebase.js:21:1261)
    at Bh.h.Cd (https://cdn.firebase.com/js/client/2.2.1/firebase.js:194:472)
    at kh.h.Bd (https://cdn.firebase.com/js/client/2.2.1/firebase.js:182:251)
    at Zg.Bd (https://cdn.firebase.com/js/client/2.2.1/firebase.js:174:364)
    at Rg.hg (https://cdn.firebase.com/js/client/2.2.1/firebase.js:172:281) 
</code></pre>

<p>Can you help me ? Thanks.</p>

<p>(sorry for my english, I'm a French student :p)</p>