ma2med Posted December 2, 2016 Share Posted December 2, 2016 Hello, I want to sort json but when I'm converting table to JSON it become like this Table [1] = "blabla", [2] = "blabla2", [3] = "blabla3" JSON [2] = "blabla2", [3] = "blabla3", [1] = "blabla" I mean by that example that the JSON is not sorted when its converted thanks. Link to comment
Best-Killer Posted December 3, 2016 Share Posted December 3, 2016 I don't understand You ! can you explain better ? Link to comment
ma2med Posted December 3, 2016 Author Share Posted December 3, 2016 This is not in same order when converting to json Link to comment
Bonsai Posted December 3, 2016 Share Posted December 3, 2016 I'm sure the order stays the same if you do it in this way: E.g. table = {"a", "b", "c"} instead of table = {a = "a", b = "b", c = "c"} Link to comment
ma2med Posted December 3, 2016 Author Share Posted December 3, 2016 Well it's not stay the same if it's string so I replaced with numbers and it's working now but ty anyway Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now