이전 노드가 반환한 항목 수 가져오기
요약
이전 노드가 반환한 항목 수를 가져오려면:
이전 노드가 반환한 항목 수를 가져오려면:
if (Object.keys(items[0].json).length === 0) {
return [
{
json: {
results: 0,
}
}
]
}
return [
{
json: {
results: items.length,
}
}
];
출력은 다음과 유사합니다.
[
{
"results": 8
}
]
if len(items[0].json) == 0:
return [
{
"json": {
"results": 0,
}
}
]
else:
return [
{
"json": {
"results": items.length,
}
}
]
출력은 다음과 유사합니다.
[
{
"results": 8
}
]
