title: How to dispatch multiple actions in ngrx/effect (redux-observable)?
body: <p>I am using Angular 6, ngrx/store. I have such effect that is responsible for updating things. Depends on some logic I want to dispatch different actions. What is the difference if I use <code>switchMap</code> insted of <code>map</code>?</p>
  
  <p>This is what I tried but it doesn't work:</p>
  
  <pre><code> @Effect()
    dispathMultipleActions$ = this.actions$.pipe(
      ofType(ActionTypes.UpdateSomething),
      map(() =&gt; {
        const actions: Action[] = [];
        const array = [1, 2, 3, 4, 5];
        array.forEach(item =&gt; {
          if (item &gt; 3) {
            actions.push(new DeleteAction(item));
          } else {
            actions.push(new ChangeAction(item));
          }
        });
        return actions;
      })
    );
  </code></pre>