【发布时间】:2020-11-10 20:14:31
【问题描述】:
我试图迭代一个数组并访问描述
我正在像这样通过常规 for 循环进行迭代
for (var index = 0; index <components.length; index++) {
const msgs = components[index].messages;
for(var value = 0; value < msgs.length; value ++ ){
console.log(msgs[value].description);
}
}
请告诉我如何通过在 react native 中使用 loadash 方法来简化它。
【问题讨论】:
标签: arrays react-native sorting lodash