# `Fun_GetListByJson_ByKey` (function)


- **Type:** FUNCTION
- **Returns:** `longtext`
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sJson` | `longtext` |
| 2 | IN | `sKey` | `varchar(100)` |
| 3 | IN | `sKeyValue` | `varchar(100)` |
| 4 | IN | `sGetKey` | `varchar(100)` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTION `Fun_GetListByJson_ByKey`'`._

## Narrative

**Business context:** Pretty-printer for an entire JSON array of key/value objects — renders every row of an embedded JSON parameter list as `name:【value】` joined by `;` for display in a single report cell. Sibling of `Fun_GetListJson_ByKey` (which fetches one keyed value) and the `_split`/`_wrap` variants (which add line breaks every N items).

**What it does:** iterates `sJson`. For each element extracts `$.sKey` (becomes the name) and `$.sGetKey` (becomes the value), strips JSON quotes, and appends `name:【value】` to the running string with `;` between rows. Returns empty string when `sJson` is not valid JSON.

**Invocation:** Status: appears orphaned. No caller found in any channel (form-master sSqlStr, gdsmodule hooks, other routines, exhaustive xly-src grep, dynamic-dispatch search) — candidate for maintainer audit.
