Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save benjaminW78/67733c4ebe0f0d2acf5a364d0b43b93d to your computer and use it in GitHub Desktop.
Save benjaminW78/67733c4ebe0f0d2acf5a364d0b43b93d to your computer and use it in GitHub Desktop.
aws elastic beanstalk variable env extract to string
const acc=[]
tableRoot = document.querySelector('table.properties-table')
.querySelectorAll('tbody>tr.ng-scope:not(.ng-hide)>td>input[type="text"]')
.forEach(( current,index) => {
if (index % 2 === 0) {
acc.push({})
acc[acc.length - 1].name = current.value
} else {
acc[acc.length - 1].value = current.value
}
}, [])
acc.reduce((acc,item)=>{return acc+=item.name+'='+item.value+'\n'},'')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment