Buscar un valor en una tabla
lookup-tableBusca una clave en una tabla (objeto o lista de pares clave/valor) y devuelve su valor o un valor por defecto, con coincidencia opcional sin mayúsculas ni tildes. Cuándo: hay que transformar, comparar o revisar con exactitud datos estructurados (JSON, CSV, YAML, XML, arreglos). No para: leer el valor en una ruta como /clientes/0/nit dentro de un documento JSON con la sintaxis RFC 6901 (json-pointer-get). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Maps a key to a value through a lookup table (object or list of key/value pairs) with an optional default, case- and accent-insensitive matching and trimming; reports whether the key was found and which table key matched. When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. [EN completo / full EN: inputSchema.description]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Key to look up (string, number, boolean or null; compared as text) (string or number or boolean or null; required; up to 1000 chars). | |
| trim | No | Trim surrounding whitespace before comparing (boolean; optional; default true). | |
| match | No | exact, case-insensitive, or case- and accent-insensitive (optional; one of: exact, case, case_accents; default "exact"). | exact |
| pairs | No | Alternative to table: list of {key, value} (keeps order, allows any key text) (array of object; optional). | |
| table | No | Lookup table: object of key -> value (object; optional). | |
| default | No | Value when the key is not found (default null) (any JSON value; optional). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| found | No | ||
| value | No | any JSON value | |
| matched_key | No |