[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'fpjson' (#fcl)

# TJSONObject.Find

Find an element by name.

## Declaration

Source position: fpjson.pp line 694

`public function TJSONObject.Find(`
`const AName: string`
`):TJSONData; overload; function TJSONObject.Find(`
`const AName: string;`
`AType: TJSONtype`
`):TJSONData; overload; function TJSONObject.Find(`
`const key: TJSONStringType;`
`out AValue: TJSONData`
`):Boolean; function TJSONObject.Find(`
`const key: TJSONStringType;`
`out AValue: TJSONObject`
`):Boolean; function TJSONObject.Find(`
`const key: TJSONStringType;`
`out AValue: TJSONArray`
`):Boolean; function TJSONObject.Find(`
`const key: TJSONStringType;`
`out AValue: TJSONString`
`):Boolean; function TJSONObject.Find(`
`const key: TJSONStringType;`
`out AValue: TJSONBoolean`
`):Boolean; function TJSONObject.Find(`
`const key: TJSONStringType;`
`out AValue: TJSONNumber`
`):Boolean;`

## Arguments

`AName` |  | Name to search for.

## Function result

Data element corresponding to AName

## Arguments

`AName` |  | Name to search for.
`AType` |  | Type to match.

## Arguments

`key` |  | Find key name
`AValue` |  | Value

## Arguments

`key` |  | Find key name
`AValue` |  | Value

## Arguments

`key` |  | Find key name
`AValue` |  | Value

## Arguments

`key` |  | Find key name
`AValue` |  | Value

## Arguments

`key` |  | Find key name
`AValue` |  | Value

## Arguments

`key` |  | Find key name
`AValue` |  | Value

## Description

Find compares the names of all elements in the object with AName and returns the matching element. If none of the element's names match, the function returns Nil

Since JSON is a case-sensitive specification, the names are searched case-sensitively.

If AType is specified then the element's type must also match the specified type.

## See also

IndexOf |  | Return index of JSONData instance in object
IndexOfName |  | Return index of name in item list