Sorting Firebase data | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 6

Sorting Firebase data

I cant sort the data that I have imported to my code from the firebase.... please how will I sort the players and their xp correctly? https://code.sololearn.com/Wy7lZ5e0z9v7/?ref=app

4th Nov 2020, 7:20 AM
LIONEL
LIONEL - avatar
4 Respostas
+ 4
You are trying to pass a CSS selector to the getElementByTagName() method. You should just pass the tag name(table) or use the querySelectorAll() method to get the collection of tables. At line 16 change let table = document.getElementsByTagName("#modal table"); to let table = document.querySelectorAll("#modal table"); BTW I notice a few other errors. At line 23 change tr to "tr" At line 34 change Obj[`${newObj[i]}`] to obj[`${newObj[i]}`]
5th Nov 2020, 1:24 AM
ODLNT
ODLNT - avatar
+ 4
ODLNT yeah!!!!!šŸ˜‚
6th Nov 2020, 5:44 AM
LIONEL
LIONEL - avatar
+ 2
ODLNT thank you Soo much!!!!!!!!!!!!!! šŸ˜šŸ˜šŸ˜šŸ˜šŸ˜šŸ˜…šŸ˜… I did not even notice those silly bugs šŸ˜‚šŸ˜‚
5th Nov 2020, 8:56 AM
LIONEL
LIONEL - avatar
+ 2
LĢ·Ā£Ā£ YĢ·OĢ·OĢ· NĢ·āˆ†LĢ·EĢ·, you're welecome. It is the silly bugs that bite us on the butt most of the time.šŸžšŸ¦‚šŸ¦ŸšŸœšŸ‘ŒšŸ½šŸ‘šŸ½
5th Nov 2020, 11:31 AM
ODLNT
ODLNT - avatar