I am using node-orm2 in express project. I find records contains all fields and perform some computation. Then responds with some records. It will send all fields of records to client. Is there an elegant way to filter some fields ?
the following codes don't work for me
// item is a model with fields ['id', 'title', 'modifiedDate'...]
item.id = undefined;
item.title = undefined;
res.send(item);
I am using node-orm2 in express project. I find records contains all fields and perform some computation. Then responds with some records. It will send all fields of records to client. Is there an elegant way to filter some fields ?
the following codes don't work for me
but client still receives all fields of item.