Skip to content
This repository was archived by the owner on May 5, 2022. It is now read-only.
This repository was archived by the owner on May 5, 2022. It is now read-only.

New attribute function for extracting single value for multivalued fields #766

@macieg

Description

@macieg

Currently available attribute functions don't allow to get a single value if a field has many of them.
Good example might be Poland:

      <prg-ad:jednostkaAdmnistracyjna>Polska</prg-ad:jednostkaAdmnistracyjna>
      <prg-ad:jednostkaAdmnistracyjna>kujawsko-pomorskie</prg-ad:jednostkaAdmnistracyjna>
      <prg-ad:jednostkaAdmnistracyjna>brodnicki</prg-ad:jednostkaAdmnistracyjna>
      <prg-ad:jednostkaAdmnistracyjna>Bartniczka</prg-ad:jednostkaAdmnistracyjna>

This is a part of a single address record. It contains many values for a key "prg-ad:jednostkaAdmnistracyjna". Region is always the second value here (kujawsko-pomorskie in this case).

I propose adding a new attribute function called i.e just get to extract single value.

            "conform": {
                "region": {
                    "function": "get",
                    "field": "jednostkaAdministracyjna",
                    "index": 1
                }
            }

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