Odwoływanie się do fieldów w body jest znacznie częstsze niż np. do timestampów, zatem zamiast poniższego:
```javascript
const before = {
created_context: {
timestamp: 1535002242349,
ip: "127.0.0.1",
user_id: null,
anonymous_user_id: "SJm9KUaoI7",
total: 1,
},
last_modified_context: {
timestamp: 1535002242349,
ip: "127.0.0.1",
user_id: null,
anonymous_user_id: "SJm9KUaoI7",
total: 1,
},
id: "Syr5YIpoL7",
collection_name: "seals",
body: { name: "Maksiu", desc: { gender: "male", weight: 280 } },
calculated_fields: {},
};
```
chcemy trzymać dane w postaci:
```javascript
const after = {
_metadata: {
collection_name: "seals",
created_context: {
timestamp: 1535002242349,
ip: "127.0.0.1",
user_id: null,
anonymous_user_id: "SJm9KUaoI7",
total: 1,
},
last_modified_context: {
timestamp: 1535002242349,
ip: "127.0.0.1",
user_id: null,
anonymous_user_id: "SJm9KUaoI7",
total: 1,
},
},
id: "Syr5YIpoL7",
name: "Maksiu",
desc: { gender: "male", weight: 280 },
calculated_fields: {},
};
```