title: How can i send an object values to post request function in angular 5+.?
body: <p><strong>component.html</strong></p>
  
  <pre><code>&lt;form [formGroup]="classForm" (ngSubmit)="onSubmit()"&gt;
      &lt;label for=""&gt;Select Class:&lt;/label&gt;
      &lt;div class="form-group"&gt;
          &lt;select formControlName="infoo" class="form-control" *ngFor="let info of classinfo"&gt;
              &lt;option [ngValue]="info"&gt;{{info.degree}}:{{info.semester}}({{info.section}})"{{info.session}}"&lt;/option&gt;
          &lt;/select&gt;
      &lt;/div&gt;
      &lt;button class="btn btn-outline-info "&gt;Proceed &lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>component.ts</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>classForm = this.fb.group(
      {
          infoo: ['']
  
      }
  );
  
  onSubmit()
  {
      this._userService.sendClassToAttend(this.classForm.value);
      this._router.navigateByUrl('Teacher-homepage/classattendance');
      console.log(this.classForm.value);
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/LCIAE.png" rel="nofollow noreferrer">console.log result</a></p>
  
  <p>when I post request I have received empty data in the server. how I access object value like infoo.degree and send to the server properly.</p>