Skip to content

JSON_GET_STR_A

Jurek Muszyński edited this page Sep 11, 2018 · 3 revisions

char *JSON_GET_STR_A(JSON json, int index)

Description

Retrieves string value from JSON array. If element is of different type (i.e. integer) then string representation will be returned.

Returns

Pointer to the string. If the element of required name doesn't exist, empty string is returned.

Example

for ( int i=0; i<JSON_COUNT(json); ++i )
    OUT("<p>%d-th name: %s</p>", i, JSON_GET_STR_A(json, i));
Clone this wiki locally