## evalFhirPath() function

Evaluates a FHIRPath expression against a resource or other object.

**Signature:**

```typescript
export declare function evalFhirPath(expression: string | FhirPathAtom, input: unknown, variables?: Record<string, TypedValue>, cache?: LRUCache<FhirPathAtom> | undefined): unknown[];
```

## Parameters

| Parameter  | Type | Description |
| ---        | ---  | ---         |
| expression | string \| [FhirPathAtom](/content/docs/sdk/core.fhirpathatom) | The FHIRPath expression to evaluate. |
| input      | unknown | The resource or object to evaluate the expression against. |
| variables   | Record<string, [TypedValue](/content/docs/sdk/core.typedvalue) > | _(Optional)_ A map of variables for eval input. |
| cache      | [LRUCache](/content/docs/sdk/core.lrucache) < [FhirPathAtom](/content/docs/sdk/core.fhirpathatom) > \| undefined | _(Optional)_ Cache for parsed ASTs. |

**Returns:**

unknown[]

The result of the FHIRPath expression against the resource or object.

- [evalFhirPath() function](/content/docs/sdk/core.evalfhirpath#evalfhirpath-function/index.html)
- [Parameters](/content/docs/sdk/core.evalfhirpath#parameters/index.html)
