Created
May 10, 2019 15:31
-
-
Save vladbatushkov/18f48b2a100ac9c684323732e1886728 to your computer and use it in GitHub Desktop.
Cayman Airlines directions.
This file contains hidden or 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
WITH ("https://vbatushkov.bitbucket.io/cayman.json") as url | |
CALL apoc.load.json(url) YIELD value | |
WITH value.origins AS os, value.destinationsPerOrigin as ds | |
UNWIND os as origin | |
FOREACH (d IN ds[origin] | | |
MERGE (a:Airport { IATA: origin }) | |
MERGE (b:Airport { IATA: d }) | |
MERGE (a)-[:TO]->(b) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment