View Single Post
mrtn
Junior Member
Join Date: May 2020
Old 05-18-2020 , 14:39   Re: REST in Pawn 1.1 - HTTP client for JSON REST APIs (Updated 2020/03/24)
Reply With Quote #69

Hi DJ Tsunami

Firstly many thanks for making this extension. It is fantastic!

Back in 2017 you mentioned that JSONObject iteration was not possible. I am wondering if this is still the case?

Here is an example of what I'm trying to do:

PHP Code:
{
    
"cvars":{
        
"mp_startmoney""800",
        
"mp_maxmoney""16000",
    }

I would like to iterate over the "cvars" property, extracting both the key and value for further processing.

How would I go about this? Is it possible to retrieve an array of keys from a JSONObject? Alternatively is it possible to extract the keys in a similar fashion to StringMaps, via StringMapSnapshot.GetKey(index)?

Thanks a lot

Last edited by mrtn; 05-18-2020 at 14:45.
mrtn is offline