---
lang: en
title: 'API docs: repository.model.toobject'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.model.toobject.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [Model](./repository.model.md) &gt; [toObject](./repository.model.toobject.md)

## Model.toObject() method

Convert to a plain object as DTO

If `ignoreUnknownProperty` is set to false, convert all properties in the model instance, otherwise only convert the ones defined in the model definitions.

See function `asObject` for each property's conversion rules.

**Signature:**

```typescript
toObject(options?: Options): Object;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  options | [Options](./repository.options.md) | _(Optional)_ |

**Returns:**

Object


