как сделать кастинг в angular объекта mongodb? - PullRequest
0 голосов
/ 08 июля 2019

Как мне привести ObjectId к строке?

// course._id is type ObjectId   
saveCourse(course:Course) {
  return this.http.put(`http://localhost:8080/producto/editar/${course._id}`, course);
}
// error in browser:
// http://localhost:8080/producto/editar/[object%20Object]

// expected in console:
// http://localhost:8080/producto/editar/5d23588e23318120b875a932
...