Data.DBXJSON.TJSONObject.Get

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Get(const I: Integer): TJSONPair; overload;
function Get(const PairName: string): TJSONPair; overload;

C++

TJSONPair* __fastcall Get(const int I)/* overload */;
TJSONPair* __fastcall Get(const System::UnicodeString PairName)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
Data.DBXJSON.pas
Data.DBXJSON.hpp
Data.DBXJSON TJSONObject

Description

Returns the pair at the given index in the JSON object.

The Get method has two overloads and is used to return the pair at a given index in the JSON object.

Call the first Get overload to obtain the pair at the index given through the I parameter, in the JSON object. If the given index is out of range, Get returns a null value.

The second Get overload is used to return a JSON pair based on the first part of a pair, given by the PairName parameter. In this case, Get returns a TJSONPair which is the first pair encountered. If no matching is found, Get returns nil.

See Also