# `Fun_GetListJson_ByNameAPS` (function)


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

## Parameters

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

## Body

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

## Narrative

**Business context:** APS-flavoured variant of `Fun_GetListJson_ByName` — same `{sParamName, sParamValue}` lookup, but returns the empty string on miss instead of `"未解析到Key"`. Used by the APS machine-selection rule engine to decode equipment-attribute parameters without polluting downstream `CONCAT`s.

**What it does:** iterates `sJson`, reads `$.sParamName` per element, compares to `sGetKey`; on match returns the stripped `$.sParamValue`. Returns `""` on no match or invalid JSON.

**Invocation:** called from `Sp_GetMachineByApsRule`.
