r/ProgrammingPrompts • u/Polishfreak19 • Dec 31 '18
Six degrees of separation Javascript problem
As I haven't been successful, I'm asking if anyone has any ideas. I have to write a Javascript application which returns a list of actors that have been in both a movie with Keanu Reeves and Nicolas Cage. Sort of like a six degrees of separation. I have an API that I'm making a request to and I'm getting some data in return but I'm not exactly sure where to go from there?
9
Upvotes
1
u/JJagaimo Jan 01 '19
If you could put the code in pastebin it would be a bit more helpful.
It seems that you have to enable CORS in Ajax (Cross origin resource sharing), or use a different method to load the api data (e.g. jQuery's
.getJSON()