Sort firebase data in descending order using negative timestamp
<p><a href="https://i.stack.imgur.com/ze0zt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ze0zt.png" alt="enter image description here"></a></p>

<p>above is a screenshot of my firebase database. i am trying to sort firebase data in descending order using negative timestamp. I 'm using the following command:</p>

<pre><code>  const feedRef = database.ref('ducks')
  feedRef.orderByChild('timestamp').on('value', (snapshot, error) =&gt; {
    const feed = snapshot.val()})
</code></pre>

<p>i keep getting the feed in the same order as the database not in the descending order like i want.I think its not working because ducks endpoint doesnt have a child name timestamp
how would i achieve this? Do the push generated keys have timestamp data ?</p>