jsonGetArrayElement

Retrieves a specific element from a JSON array by index. Takes json string, key string, and index integer. Returns extracted element as string via ReturnString.

JSON

Parameters & Returns

Parameters

json String
key String
index Int

Returns

String

Quick Summary

Retrieves a specific element from a JSON array by index. Takes json string, key string, and index integer. Returns extracted element as string via ReturnString.

Technical Exegesis...

Retrieves a specific element from a JSON array by index. Takes json string, key string, and index integer. Calls FindKeyPosition to locate array field. If key not found, returns empty string "". Gets position after colon. Expects opening bracket '['. Skips opening bracket and whitespace. Sets elementStart to current position. Uses currentIndex counter (starts at 0). Iterates through array while tracking depth, inString, and escaped flags (same logic as jsonGetArrayCount).

Example

Example.bam
; No example implemented yet