European Parliament MCP Server API - v1.1.16
    Preparing search index...
    • Extracts a string value from the first matching field name.

      EP API JSON-LD responses sometimes return single-value fields as arrays (e.g. inverse_decided_on_a_realization_of: ["eli/dl/event/..."]). When the value is an array, the first element is used.

      Parameters

      • data: Record<string, unknown>

        Record to search

      • fields: string[]

        Field names to try in order

      Returns string

      String value from first matching field, or empty string