Home  >  Q&A  >  body text

如何使MongoDB查询结果只以value列表的形式返回?

可不可以不显示key

PHP中文网PHP中文网2736 days ago581

reply all(2)I'll reply

  • 巴扎黑

    巴扎黑2017-04-24 09:14:05

    Json is originally unordered and requires a key to identify its ownership. If there is no key, the ownership of the value cannot be determined, so such a function will not appear again.
    It is more appropriate to meet your needs on the business side.

    reply
    0
  • 高洛峰

    高洛峰2017-04-24 09:14:05

    There should be none. In fact, this will not have much impact on your program. Just take the value.

    reply
    0
  • Cancelreply