javascript - Is it possible to pass a map with not ordered integer keys as a json to UI? -
i'm trying pass map int keys ui in json format. use linkedhashmap
@ server side , compose follows:
{ 3: "some value 3", 1: "some value 1", 2: "some value 2" }
but when check coming object @ ui side map sorted key:
{ 1: "some value 1", 2: "some value 2", 3: "some value 3" }
i tried use treemap
works in same way.
i'm wondering why initial order has broken when using int keys whereas order preserved when uses not integer keys.
Comments
Post a Comment