mirror of
https://github.com/frappe/books.git
synced 2025-01-26 16:48:28 +00:00
12 lines
351 B
Markdown
12 lines
351 B
Markdown
# Metadata
|
|
|
|
Metadata are first class objects in Frappe.js. You can get a metadata object by `frappe.get_meta`. All objects from the `models` folders of all modules are loaded.
|
|
|
|
### Example
|
|
|
|
```js
|
|
let todo_meta = frappe.get_meta('ToDo');
|
|
|
|
// get all fields of type "Data"
|
|
let data_fields = todo_meta.fields.map(d => d.fieldtype=='Data' ? d : null);
|
|
``` |