How to use map and assign the value back
问题 I have a list of books, with IsEnable default to False. I need to check each book whether its enabled or not in onInit(). I thought of adding a rxjs map and call the getEligibleBooks() function inside the map, but how to assign the return value true or false in the IsEnable? Books.ts export class Book{ Name:string; IsEnable:boolean; } books.component.ts ... books = Observable.of([{"Name":"A", "IsEnable":"False"},{"Name":"B", "IsEnable":"False"}]); ... getEligibleBooks(book){ //complex logic