2
0
mirror of https://github.com/frappe/books.git synced 2024-11-10 07:40:55 +00:00
books/docs/models/metadata.md
2018-01-12 17:55:07 +05:30

351 B

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

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);