## toJsBoolean() function [​](/content/docs/sdk/core.tojsboolean#tojsboolean-function "Direct link to toJsBoolean(/index.html) function")

Converts unknown object into a JavaScript boolean. Note that this is different than the FHIRPath "toBoolean", which has particular semantics around arrays, empty arrays, and type conversions.

**Signature:**

```typescript
export declare function toJsBoolean(obj: TypedValue[]): boolean;
```

## Parameters [​](/content/docs/sdk/core.tojsboolean#parameters "Direct link to Parameters"/index.html)

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| obj | [TypedValue](/content/docs/sdk/core.typedvalue) | Any value or array of values. |

**Returns:**

boolean

The converted boolean value according to FHIRPath rules.
