【发布时间】:2018-07-08 13:28:54
【问题描述】:
我正在尝试获取数据,数据输出到控制台,但是错误发生的一切都很顺利...
JOSN 数组 vk newsfeed !
代码:
export function ParseAttach(content) {
if (content == undefined) return true;
let img = [];
let index = 0;
content.map(function (item, i) {
if (item.type == 'photo' || item.type == 'graffiti') {
index++;
img[0] = index;
img[index] = item.photo.photo_604;
} else if (item.type == 'link') {
index++;
img[0] = index;
console.log(item.link.photo.photo_604);
img[index] = item.link.photo.photo_604;
}
});
}
【问题讨论】:
-
向我们展示
item.photo.photo_604对象的外观。 -
解决问题如下我创建新函数
-
抱歉,您的评论几乎无法阅读。
-
对不起,我的英语水平谷歌翻译
-
对不起,我明白了这个问题。我的意思是您在评论中的答案格式不可读。
标签: javascript reactjs react-native