Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Nested Struct

node v6.17.1
version: 1.0.0
endpointsharetweet
const jkt = require('jkt') const Person = jkt` name: String age: Number birthday: Date ` const SchoolClass = jkt` name: String grade: Number teacher: ${Person} ` console.log(SchoolClass.schema) const mySchoolClass = SchoolClass({ name: 'Awesome Class', grade: '10', teacher: { name: 'Amelia', age: 25, birthday: '1992-05-31' // ISO 8601 } }) console.log(mySchoolClass.j())
Loading…

no comments

    sign in to comment