System.JSON.Builders.TJSONIterator.Find

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Find(const APath: String): Boolean;

C++

bool __fastcall Find(const System::UnicodeString APath);

Properties

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

Description

Searches for a JSON item in the specified JSON path.

You must indicate the full path of the item using a dot notation or quoted notation, such as:

  • Dot notation: 'entities.urls[0].indices[1]'
  • Quoted notation: entities["urls"][0]["indices"][1]

Find returns True if the source JSON reader contains an item that matches the specified JSON path, and moves the iterator to such item. Find returns False if the path was not found.

Note: If you did not pass a rewinding procedure to the iterator constructor, Find raises an exception.

See Also