Skip to content

Instantly share code, notes, and snippets.

@clucasalcantara
Created May 10, 2018 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clucasalcantara/dc34e6714d59649744776e11ffe76eb1 to your computer and use it in GitHub Desktop.
Save clucasalcantara/dc34e6714d59649744776e11ffe76eb1 to your computer and use it in GitHub Desktop.
gist for help
Object.entries(PATO).map(value => {
const row = value[0].split('[')
const key = row[0]
const value1 = row[1].slice(0,-1)
const value2 = value[1]
return {
[key]: {
[value1]: [value2]
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment