Forum:API: Request a JSON tree of Sections of a page?

Greetings, as the title suggest, I wish to ask how to retrieve a JSON tree of Section names of a given page.

You see, I wish to have function  to return the section content by passing a sectionName. But i was unable to find anyway from api.php to retrieve it by directly passing a non-number sectionName (or I wasn't looking good enough, anyway).

However the only loop hole i could think of from the API was looping the  from 1 till undefined then parsing the first line containing the inside of ==  == until it could match sectionName. It was good but I think this would be too congestive as any section could contain 100,000+ characters, thereafter just "dumping it" when it finds that it wasn't it, then moving on to the next section with a possible 100,000+ characters - again? As with any developer, I want AMAP to consume as little bandwidth as possible as I expect this function to be used several times in a page when the need arises.

So, basically my question is how to retrieve a (soft of) JSON tree of Section names (via API) so my app will use that to loop and compare the section names, then ultimately once found, use a 'reference number'  to retrieve the contents - just once. Or any other non-congestive solution would be good. ^^

Thank you in advance - ^^ Fe2+ | talk 05:38, December 18, 2011 (UTC)