How to include tags names in Contentful API object

Viewed 54

I'm trying to get attached to an object tags list with tags names, and couldn't find any documentation how to do this. Right now my object looks like this using await $contentful.getEntry(route.params.id):

{
  "metadata": {
    "tags": [
      {
        "sys": {
          "type": "Link",
          "linkType": "Tag",
          "id": "nuxtJs"
        }
      },
      {
        "sys": {
          "type": "Link",
          "linkType": "Tag",
          "id": "vueJs"
        }
      },
      {
        "sys": {
          "type": "Link",
          "linkType": "Tag",
          "id": "vuex"
        }
      }
    ]
  },
  "sys": {...},
  "fields": {
    "name": "Bla",
    "subtitle": "bla",
    "url": "https://www.bla.com/",
    "type": "portfolio",
    "date": "2021-03-03",
    "aboutClient": "Bla",
    "objective": "Bla"
   }
}

Here metadata includes tags, but doesn't include tag names, for example tag name for nuxtJs is Nuxt.js.

Is there any way to also include tags names? How I can do it using https://github.com/contentful/contentful.js SDK?

0 Answers
Related