How can I get an object data inside a relation widget?

Hello guys. First of all thanks for helping out newbies like me.
I have a collection for user badges where I have a title field and then an object field with an image of the badge and a description.
Then I have a members collection with a relation widget searching inside my badges collection.

The problem I have is that I don’t know how to make my relation widget get the entire object of badges as value.

I have tried setting the valueField of my relation widget in different ways such as:
valueField: "badge.*."
valueField: "badge*"
valueField: ".*"
valueField: "*"

And the only way it works is if I only get only one value, for example:
valueField: "badge.description"

How can I get the entire object?


Members Collection:

  - name: members
    label: Members
    extension: "json"
    folder: src/data/members
     preview: false
    create: true
      - { name: title, label: User}
      - name: "badges" 
        label: "Badges"
        widget: relation
        collection: badges
        searchFields: ["title"]
        displayFields: ["title", "description"]
        valueField: ""
        multiple: true
        required: false

Badges Collection:

- name: badges
    label: Badges
    folder: src/data/badges
    create: true
    extension: "json"
    media_folder: 'static/images/badges'
    public_folder: '/images/badges'
     preview: false
      - { name: title, label: Name of the badge}
      - name: badge
        label: badge
        widget: object
          - { name: description, label: Description of the badge, widget: string }
          - { name: image, label: Image of the badge, widget: image }

Hi @falconmasters and welcome to the community!

The wildcard * character is used for referencing list fields.

It is important to remember that the value field should be used as a unique identifier for the relation, so using fields that might change can break the relation.

However you can reference multiple fields via string templates, e.g. valueField: {{fields.badge.description}} - {{fields.badge.image}}