Skip to content

Instantly share code, notes, and snippets.

Last active Sep 3, 2020
What would you like to do?
Parse and import a JS array into neo4j via the neo4j-driver
const session = driver.session()
const query = `WITH $data AS values
UNWIND values AS item
MERGE (thing:Thing {id:})
SET thing.title = item.title`
.run(query, { data: yourArrayHere })
.catch((error) => {
console.error("Error syncing data: ", error)
.then(() => {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment