-
-
Save web20opensource/480610c19459be2cb1bc to your computer and use it in GitHub Desktop.
Learning RxJs
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
return movieLists.map( | |
// map receives 3 args | |
// cat - element to iterate | |
// cIndex - index in the array of the element | |
// cCollection - movieLists array | |
// same applies for the rest if the code | |
(cat, cIndex, cCollection) => { | |
//v for videos object | |
return cat.videos.map ( (v,vIndex,vCollection) => { | |
//if you open the debugger (F12) you will see the variables values | |
debugger; | |
//pressing F11 in the next line and with some good luck you can see the code of ex 7 | |
return v.boxarts.filter( (box,bIndex,bCollection) => { | |
debugger; | |
//using coercion with double equals cool! | |
return box.width=='150' | |
}) | |
.map( (filteredResult,fRIndex,fRCollection) => { | |
debugger; | |
return { | |
'id': v.id , | |
'title' : v.title , | |
'boxart': filteredResult.url | |
} | |
}) | |
}).concatAll() | |
}).concatAll() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://jhusain.github.io/learnrx/