getting tis error on a bit of js error getting list TypeError: res.forEach is not a function
API.dataObjectList('user_pictures', filter, orderBy, userKey2, pageSize).then((res) => {
debug_log("my list ", JSON.stringify(res));
res.forEach(function(element) {
debug_log("say hello ")
});
}).catch(function(error) {
debug_log("error getting list " + error);
});
not sure where the problem is
debug_log("my list ", JSON.stringify(res));
give me:
my list
{"prev":null,"objects":[
{"channel_room":null,"group":null,"links":{"self":"**************"},
"userPhotoName":"kevin","photos":{"type":"file","value":"**************b0fb5df7289ae43a396cb.jpg"},"theDate":"9/1/2018","revision":1},
{"channel_room":null,"group":null,"links":{"self":"**************"},
"userPhotoName":"kevin","photos":{"type":"file","value":"**************59b474815583d7d5f9eb2.jpg"},"theDate":"9/1/2018","revision":1}],
"next":"**************"}