The keys in the generated JSON content are unordered
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
**Describe the bug**
The keys in the generated JSON content are unordered.
**To Reproduce**
https://github.com/liby/decap-cms-field-sort-issue#reproduction-steps
**Expected behavior**
The keys are sorted in alphabetical order from A-Z or as described [in the document](https://decapcms.org/docs/configuration-options/#fields:~:text=The%20order%20of%20the%20fields%20in%20your%20Decap%20CMS%20config.yml%20file%20determines%20their%20order%20in%20the%20editor%20UI%20and%20in%20the%20saved%20file):
> The fields option maps editor UI widgets to field-value pairs in the saved file. The order of the fields in your Decap CMS config.yml file determines their order in the editor UI and in the saved file.
**Screenshots**

**Applicable Versions:**
- Decap CMS version: 3.0.0
- Git provider: GitHub
- OS: macOS 13.5.1 (22G90)
- Browser version: Chrome 116.0.5845.140
- Node.JS version: 18.17.0
**CMS configuration**
https://github.com/liby/decap-cms-field-sort-issue/blob/main/admin/config.yml
**Additional context**
[Possible relevant discussions](https://github.com/decaporg/decap-cms/discussions/6760).
Contributor guide
Research direction
Start with the linked reproduction repository and its admin/config.yml, then compare the declared field order with the generated JSON content. Check the linked discussion for context about ordering behavior. Done means generated keys follow the configured field order in the saved file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100