- Joined
- Jul 3, 2017
- Messages
- 233
I'm trying to read a JSON here, and I kind of have it working using brl.json. But I hit a problem: object values are being sorted and I need them in the order they are in the JSON file.
Other than turning objects into arrays, is there any other way I can just 'disable' sorting?
For example, I have on JSON:
But this is returning as sorted, like beard - eyes - hair - mouth, etc. I need them in the exact order in the file, because they will be rendered that way (and the order may change as well, its not like nose will be always on top of beard, for example).
Other than turning objects into arrays, is there any other way I can just 'disable' sorting?
For example, I have on JSON:
Code:
"portrait": {
"skin": [124,60,61],
"eyes": [0,0,0],
"mouth": [0,0,0],
"beard": [0,0,0],
"nose": [50,7,21],
"hair": [0,0,0]
}
But this is returning as sorted, like beard - eyes - hair - mouth, etc. I need them in the exact order in the file, because they will be rendered that way (and the order may change as well, its not like nose will be always on top of beard, for example).