In order to reduce the cognitive overhead of understanding the chain of combinators,
I moved the res.json() step to a separate map operation after the fact.
Since this isn't a performance-critical hot path, the cost of separating into
a separate step isn't a big concern.
If @blesh's demo goes deep into the power of switchMap, then we can leave it as is,
but @robwormald and I were hoping to simplify by breaking into two steps.
…for readability
In order to reduce the cognitive overhead of understanding the chain of combinators, I moved the res.json() step to a separate map operation after the fact.
Since this isn't a performance-critical hot path, the cost of separating into a separate step isn't a big concern.
If @blesh's demo goes deep into the power of switchMap, then we can leave it as is, but @robwormald and I were hoping to simplify by breaking into two steps.