Sign in Join
FPDoc Onlineexperiment

TJSONObject.IndexOf function

Member of TJSONObjectpublicIn unit fpJson

Return index of JSONData instance in object.

Declaration

pascal
function IndexOf(Item: TJSONData): Integer

Arguments

Item

Object instance to search for.

Function result

Index of Obj in the array, or -1.

Description

IndexOf compares all elements in the object with Obj and returns the index (in the Items property) of the element instance that equals Obj. The actual instances are compared, not the JSON value. If none of the elements match, the function returns -1.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.