How storing structured data in contract?


We need to store user-struct into Contract.


struct user_type {
    name   string
    age    uint
    father user_type

I found storage APIs, but value must be string type in current IOST blockchain javascript policy.

Which API can i call for do that ?

Mabye the which API can call like this

class permissions {
    init() {
        storage.put('master', {
            name:'super #su',

    update (name, newPermission) {
        let p = storage.get(name)
        assert(p != null, 'user not found')
        p.permission = newPermission
        storage.put(name, p)