xopabyteh
07/19/2024, 1:54 PMps
curl -X 'GET' \
  'https://localhost:5151/umbraco/delivery/api/v2/content/item/blogs?expand=properties%5B%24all%5D&fields=properties%5B%24all%5D' \
  -H 'accept: application/json'
i get this result
json
{
  "contentType": "blogs",
  "name": "Blogs",
  "createDate": "2024-07-19T15:21:02.723Z",
  "updateDate": "2024-07-19T15:37:37.753Z",
  "route": {
    "path": "/cz/blogs/",
    "startItem": {
      "id": "cb4a02ea-0f37-4aaf-9ccc-0f7386d67e79",
      "path": "blogs"
    }
  },
  "id": "cb4a02ea-0f37-4aaf-9ccc-0f7386d67e79",
  "properties": {
    "blogCategories": null
  },
  "cultures": {
    "en-US": {
      "path": "/en/blogs/",
      "startItem": {
        "id": "cb4a02ea-0f37-4aaf-9ccc-0f7386d67e79",
        "path": "blogs"
      }
    },
    "cs-CZ": {
      "path": "/cz/blogs/",
      "startItem": {
        "id": "cb4a02ea-0f37-4aaf-9ccc-0f7386d67e79",
        "path": "blogs"
      }
    }
  }
}
blogCategories property is null. How can i get the content such that i can access the blogCategories?
https://cdn.discordapp.com/attachments/1263856590285443103/1263856590835023945/image.png?ex=669bc1ac&is=669a702c&hm=9615281025172f53b19a7e42cdc8d87ab122abd78ba618c38e454e844f980c67&xopabyteh
07/19/2024, 5:59 PMxopabyteh
07/20/2024, 9:24 AMcs
        var categories = blogs!.Children
            .Select(c => new BlogCategoryResponse(
                c.GetProperty("title")!.GetValue()!.ToString()!,
                c.Children.Select(a => new BlogArticleResponse(
                    a.GetProperty("title")!.GetValue()!.ToString()!,
                    a.GetProperty("body")!.GetValue()!.ToString()!
                ))
                    .ToArray()
            ))
            .ToArray();