Arrays 如何将数据更新为角度中的嵌套数组?

Arrays 如何将数据更新为角度中的嵌套数组?,arrays,json,angular,typescript,angular8,Arrays,Json,Angular,Typescript,Angular8,以下是我的JSON文件的外观: { "responseCode": 200, "responseMessage": "" , "details": "{\"id\":1,\"name\":\"sss\",\"status\":\"status 1\",\"active\":true,\"createdAt\":\"Dec 4, 2019, 4:21:46 PM\",\"modifiedAt\":\"Dec 5, 2019, 10:21:09 AM\",\"desc

以下是我的JSON文件的外观:

   {
    "responseCode": 200,
    "responseMessage": "" , 
    "details": "{\"id\":1,\"name\":\"sss\",\"status\":\"status 1\",\"active\":true,\"createdAt\":\"Dec 4, 2019, 4:21:46 PM\",\"modifiedAt\":\"Dec 5, 2019, 10:21:09 AM\",\"description\":\"daddddddddddddd\",\"imagePath\":\"imagepath 1\",\"viewCount\":133,\"important\":1}",
    "timestamp": 0
}
TS文件:

ngOnInit() {
this.blog.getBlog(this.id).subscribe((data: {}) => {
  this.blogData = JSON.parse(data['details']);
})
  } 
   updateBlog() {
if(window.confirm('Are you sure, you want to update?')){
  this.blog.UpdateBlog(this.id, this.blogData).subscribe(data => {
    this.router.navigate(['/home/blogger'])
  })
}
}
服务文件:

UpdateBlog(id,blog): Observable<Blog> {
  let body = JSON.stringify(blog);
  console.log(blog)
  return this.http.put<Blog>('blog/' + id, body, this.httpOptions)
  .pipe(
    retry(1),
    catchError(this.handleError)
  )
}

您得到的错误是什么?Http失败响应400正常,但后端API没有问题您在后端使用什么技术?400响应可能表示该资源上的PUT请求不受支持,或者您的请求格式不正确。实际上,我可以使用postman更新值,因此我在那里没有看到任何错误。我使用mongoDb。但从控制台可以清楚地看到。log PUT请求未被处理,因此在postman上处理错误,在“发送”按钮的右下方,单击“代码”并将内容粘贴到此处。
    PUT /api/blog/3 HTTP/1.1
Host: 13.234.196.102:8080
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJwcmF2aWwiLCJpYXQiOjE1NzU1NDk2NTEsImV4cCI6MTU3NTYzNjA1MX0.j9FBDckN2jfi3-LU5coVGRZfW3wQEBnGpF4MAZ2u_pH6MRdA2KU_xrZTvb1ki9DWTydQ8YTrAgYg2uMkKktn9A
User-Agent: PostmanRuntime/7.19.0
Accept: */*
Cache-Control: no-cache
Postman-Token: 7e19e28c-6dde-42e8-b9f2-c1546eb65825,82753b69-39ad-48a5-b5fd-552e07008594
Host: 13.234.196.102:8080
Accept-Encoding: gzip, deflate
Content-Length: 160
Connection: keep-alive
cache-control: no-cache

 {

        "name": "sss",
        "description": "Thsh",
        "imagePath": "imagepath 1",
        "status": "status 1",
        "active": true
 }