如何从repository.query()函数访问数据?

时间:2019-07-26 07:30:12

标签: postgresql nestjs typeorm

我正在使用repository.query('query',parameters)执行查询,并向我返回了预期的结果。但是我无法在结果中访问单个参数

我得到这个结果-

[
  {
      "title": "Prasad's 2nd Post",
      "content": "My second post",
      "advertiser_id": "1"
  },
  {
      "title": "Testin Post",
      "content": "Testing post content<html> </html>",
      "advertiser_id": "1"
  },
  {
      "title": "Testin Post 2",
      "content": "Testing post 2 content<html> </html>",
      "advertiser_id": "1"
  }
]

任何机构都知道如何访问repository.query()方法返回的原始结果吗?

我正在使用postgres数据库,nestjs和typeorm

0 个答案:

没有答案