Skip to content

Unwrap a collection of multiple content types #292

@alejandrorangel

Description

@alejandrorangel

How can a collection of different content types can be unwrap?

our json preview looks like this

      "name": "Activities",
      "type": "Array",
      "localized": false,
      "required": true,
      "validations": [],
      "disabled": false,
      "omitted": false,
      "items": {
        "type": "Link",
        "validations": [
          {
            "linkContentType": [
              "practiceMode",
              "videoLesson",
              "feedbackMode"
            ]
          }
        ],
        "linkType": "Entry"
      }
    }

but inside our model what is the best approach to unwrap it?
@ContentfulField var activities: <....>? = null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions