From RAD Studio API Documentation
Jump to: navigation, search


function Next(const AKey: String = ''): Boolean;


bool __fastcall Next(const System::UnicodeString AKey = System::UnicodeString());


Type Visibility Source Unit Parent
function public
System.JSON.Builders TJSONIterator


Moves the iterator to the next JSON item of the current array or object.

The first call to Next, without providing AKey, moves the iterator to the first JSON item of the input data. Successive calls move the iterator to the next JSON items of the current JSON level. Next returns False if there are no more items where the iterator can move to; or True if the input data contains more items.

You may specify AKey, either an array index number or an object key name, to forward the iterator to such key. When the provided key is found, Next returns True and moves the iterator to that key. Next returns False when the key was not found, and forwards the iterator to the last item of the current array or object.

Next does not:

  • Enter an array or object item; use Recurse for this purpose.
  • Return to the parent array; use Return for this purpose.

See Also