Order.assign() change object order. I pas
{val: 1, ts: 2}
I get
{ts: 2, val: 1}
In my app all tied to the keys, and key order is important. What do& Help..
Order.assign() change object order. I pas
{val: 1, ts: 2}
I get
{ts: 2, val: 1}
In my app all tied to the keys, and key order is important. What do& Help..
Javascript objects keys are unordered by definition (See https://stackoverflow.com/a/32149345/772035), so key order cannot be important. If the order that keys are displayed in or visited in when iterating is causing problems, then your app has a bug that needs fixing.
Usually you just need to restructure your data so that you have an array instead of an object, since arrays have guaranteed order in Javascript.