Skip to content

Instantly share code, notes, and snippets.

@SidneyAllen
Created September 22, 2021 14:05
Show Gist options
  • Save SidneyAllen/29dcef86bc708416280d26671c41e000 to your computer and use it in GitHub Desktop.
Save SidneyAllen/29dcef86bc708416280d26671c41e000 to your computer and use it in GitHub Desktop.
av-bulk-update-get-route
/* Use the Array.map() method to remove the id and name attributes from the objects of the results */
const addresses = results.rows.map(e => {
return Object.keys(e).reduce((object, key) => {
if (key !== "name" && key !== "id") {
object[key] = e[key]
}
return object
}, {});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment