GetJSONElement()
语法
Result = GetJSONElement(JSONValue, Index)概要
Return the JSON array element at the given 'Index' of a JSON value of type #PB_JSON_Array.
参数
JSONValue The JSON value. The value must be of type #PB_JSON_Array. Index The index of the array element to return. The index must be between 0 and JSONArraySize() - 1.
返回值
The address of the JSON value at the specified array index. If the given 'Index' is out of range, the result is 0.
示例
ParseJSON(0, "[1, 2, 3, 4, 5]") For i = 0 To JSONArraySize(JSONValue(0)) - 1 Debug GetJSONInteger(GetJSONElement(JSONValue(0), i)) Next i
参阅
SetJSONArray(), AddJSONElement(), RemoveJSONElement(), ResizeJSONElements(), ClearJSONElements(), JSONArraySize(), JSONType()
已支持操作系统
所有