title: Update NGXS state for an object inside array
body: <p>I have NGXS state defined as array.</p>
  <pre><code>interface Sample {
   name: string;
   age: number;
  }
  
  @State&lt;Sample[]&gt;({
    name: 'samples',
    defaults: [] as Sample[]
  })
  @Injectable()
  export class SampleState {
  }
  </code></pre>
  <p>Now let us say I have an existing state of <code>[{name:'abc', age: 1}, {name: 'def', age:2}]</code></p>
  <p>How can I add an action that modifies the age for an Sample based on name and updates the state.
  If it is an object I could use simple patchState, but here state is an array so I am not sure.</p>
  <pre><code>  @Action(SampleActions.UpdateAge)
    updateAge(context: StateContext&lt;Sample[]&gt;, action: SampleActions.UpdateAge): void {    
    }
  </code></pre>
  <p>This is my defined action in SampleActions</p>
  <pre><code>  export class UpdateAge{
      static readonly type = '[Sample] Update Age';
      constructor(public name: string, public age: number) {}
    }
  </code></pre>
  <p>Thanks.</p>