infer_json_key
No overview available.
def infer_json_key(
target: string,
candidates: array,
context: string = null
) - > string
Infers the most likely JSON key from a list of candidates based on a target name and optional context. This is used to map dynamic or fuzzy input keys to a known schema.
Parameters
| Name | Type | Description |
|---|---|---|
| target | string | The desired field name or concept to find a match for. |
| candidates | array | A list of available keys found in the source JSON object. |
| context | string = null | Additional metadata or surrounding text to improve matching accuracy in ambiguous cases. |
Returns
| Type | Description |
|---|---|
string | The best-matching key from the candidates list, or null if no confident match is found. |