0

我正在为我的员工管理应用程序使用 couchdb。我在 couchdb 中创建了一个包含以下员工 json 的文档:

{"employees" : [{"id":"123","name":"Henry","address":"HSR"},{"id":"456","name":"Erik","address":"Kormangala"}]}

当我在终端上键入时:

curl -X GET http://127.0.0.1:5984/myapp/9351c38f9a64fd26e40b2ac4cf012efe

其中 9351c38f9a64fd26e40b2ac4cf012efe 是我的文档 ID。我明白了:

{"_id":"9351c38f9a64fd26e40b2ac4cf012efe","_rev":"7-77b5766b830a3c07c522e9ab17afae09","employees":[{"id":"123","name":"Henry","address":"HSR"},{"id":"456","name":"Erik","address":"Kormangala"}]}

我感兴趣的只是这个:

[{"id":"123","name":"Henry","address":"HSR"},{"id":"456","name":"Erik","address":"Kormangala"}]

我该怎么做?提前感谢您的解决方案和/或建议。

4

0 回答 0