Skip to content

TJSONObject.IndexOfName

Return index of name in item list.

Declaration

Source position: fpjson.pp line 723

public 
function TJSONObject.IndexOfName(const AName: TJSONStringType; 
                                CaseInsensitive: Boolean=False)
                                 : Integer;

Description

IndexOfName compares the names of all elements in the object with AName and returns the index (in the TJSONData.Items property) of the element instance whose name matched AName. If none of the element's names match, the function returns -1.

Since JSON is a case-sensitive specification, the names are searched case-sensitively by default. This can be changed by setting the optional CaseInsensitive parameter to True

See also

Name Description
IndexOf Return index of JSONData instance in object.