Skip to content
Advertisement

Reverse iteration in a jQuery Object?

JavaScript

Now while I iterate, I want to get ‘s’ first-

JavaScript

I have tried test_data.revers() which does not work. Any solution?

Advertisement

Answer

For a defined order, you could sort the keys of the object and iterate them in descending order of the first value of the array.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement