# `Fun_GetListJson_ByKey1` (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)` |

## Body

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

## Narrative

**Business context:** Variant of `Fun_GetListJson_ByKey` where the lookup key is hard-coded to `$.sParamKey`. Given an array of `{sParamKey: X, …}` objects, finds the element with `sParamKey = sKeyValue` and returns the value at `$.sKey`. Tailored to the JSON-encoded parameter pairs used in the MFT/work-order schema.

**What it does:** iterates `sJson`, reads `$.sParamKey` per element, compares to `sKeyValue`; on match returns the stripped `$.sKey`. Returns `"未解析到Key"` on no match or invalid JSON. (The `Else RETURN p_sKeyValue` branch is commented out.)

**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. The script file `Fun_GetListJson_ByKey1.sql` is the function definition itself, not a caller.
