=proto int duk_push_object(duk_context *ctx); =stack [ ... ] -> [ ... obj! ] =summary

Push an empty object to the stack. Returns non-negative index (relative to stack bottom) of the pushed object.

=example int obj_idx; obj_idx = duk_push_object(ctx); duk_push_int(ctx, 42); duk_put_prop_string(ctx, obj_idx, "meaningOfLife"); /* object is now: { "meaningOfLife": 42 } */ duk_pop(ctx); /* pop object */ =tags stack object =fixme There is no way to give an initial size for object property table. This would be useful to minimize memory allocations.