我必须从 cloudant 数据库中读取数据。结果 msg.payload 具有如下值:
[{"_id":"0de4df1286119588b8529a01ce7ae88c","_rev":"2-6702cf5c73c76536d403caaae37f9f99","payload":{"direction":"out","count":"-1","timestamp":"2016-10-06T13:25:24.262Z"}},{"_id":"1cf44a5241cc413a21920b069942851c","_rev":"1-f0f2271864d39b5ca633fe284590ae99","payload":{"direction":"out","count":"-1","timestamp":"2016-10-06T14:38:11.920Z"}},{"_id":"970049cb8ec6e3853d50f65f520ad385","_rev":"1-f7642fc0eab3938388138e04ce1d2c26","payload":{"direction":"IN","count":"1","timestamp":"2016-10-06T13:25:16.286Z"}}]
我想从上面的有效负载中选择所有 _id。
我尝试使用 msg.payload._id 但它不起作用。结果显示为“{}”