简体   繁体   English

NodeJS:如何访问 TextRow?

[英]NodeJS: how to access TextRow?

I am using sequalize to fetch data with node and angular but I am getting the below result.我正在使用 sequalize 通过节点和 angular 获取数据,但我得到以下结果。

result:结果:

count---- [ TextRow { totalCount: 39, total_rating: 0, number_of_review: null } ]

Now I want to return totalCount from above result.现在我想从上面的结果中返回totalCount I have tried everything but not able to access it.我已经尝试了一切,但无法访问它。

Please try请试试

output[0].totalCount

I am considering output as your property name.我正在考虑将 output 作为您的属性名称。 in console it is displayed as array.在控制台中它显示为数组。 Thats why i am getting index 0 then totalCount property of object at index 0.这就是为什么我得到索引 0,然后是索引 0 处 object 的 totalCount 属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM