Loopbackjs: value is not an object

  angular, angular-loopback, loopback, loopbackjs

I am trying to update an array of objects by sending a put call from angular side to backend which is written in LoobackJS. Even thought the data is right but I am getting Value is not an object error from backend. My backend works fine when I send post call but with put I get this error.

Here is my angular service

updateData(id: string, data): Observable<any> {
    return this.http.put<any>(
        `${environment.url}/RegionalPricings/${id}`,
        data
    );
}

Here is how my data looks like

enter image description here

Here is my loopbackJS model

enter image description here

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.