Created
September 22, 2021 14:05
-
-
Save SidneyAllen/29dcef86bc708416280d26671c41e000 to your computer and use it in GitHub Desktop.
av-bulk-update-get-route
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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