Answer the question
In order to leave comments, you need to log in
How to iterate a JS object in a source sequence?
Tell me how to display the JS object in the original order.
Example: https://jsfiddle.net/ecerev6a/ should output:
Not set ()
Yes (1)
No (0)
No (0)
Yes (1)
Not set ()
Answer the question
In order to leave comments, you need to log in
No way, you need to use a data structure in which the order of the elements is guaranteed - an array.
For example:
var ar = [
{value: '', text: 'Не задан'},
{value: '1', text: 'Да'},
{value: '0', text: 'Нет'}
];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question