Skip to content

Instantly share code, notes, and snippets.

@ikasoba
Created May 14, 2022 09:14
Show Gist options
  • Save ikasoba/3c3339b2dd2ddaa452c271d783a6697d to your computer and use it in GitHub Desktop.
Save ikasoba/3c3339b2dd2ddaa452c271d783a6697d to your computer and use it in GitHub Desktop.
jsonのソート
const sortJSON = o => Object.fromEntries(Object.entries(o).sort((a,b)=>a[0].charCodeAt(0) - b[0].charCodeAt(0)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment