Hey everyone,
I want to pass the badge for level 1, but for the last step I can’t get the bookedSum, here is the result
{
“totalBooked”:
16,
“bookedSum”:
null
}
here is the the code in the code node:
let items = $input.all();
let totalBooked = items.length;
let bookedSum = 0;
Thanks @min_gao! It seems to me the orderPrice field lives under fields. So I’d try replacing bookedSum = bookedSum + items[i].json.orderPrice; in your line 5 with this: