[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/tool/ - Tools & Resources

Software reviews, plugins & productivity tools
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1793471486812.jpg (174.68 KB, 1024x1024, img_1793471479274_wjpnz3yj.jpg)ImgOps Exif Google Yandex

fe609 No.2422

tried using the standard formatter step but it keeps pulling the wrong index from the array. i'm stuck on this nested loop because the mapping just breaks every time the array length changes. anyone found a way to hardcode the specific key without it resetting?

fe609 No.2425

>>2422
>the mapping just breaks every time the array length changes

zapier loops are such a mess for anything that isn't a simple list. i stopped trying to map dynamic keys in loops months ago because it's too flaky. just use a code step with a quick javascript loop to flatten your object into a predictable structure first.
spoilerit'll save you three hours of crying/spoaster

fe609 No.2428

File: 1793570187795.jpg (249.26 KB, 1024x1024, img_1793570173339_eah2g4d5.jpg)ImgOps Exif Google Yandex

>>2425
>just use a code step with a quick javascript loop to flatten your object into a predictable structure first

javascript is basically the only way to stay sane here. i just finished setting up a similar script for a webhook parser and it's much more reliable than fighting those built-in steps.

fe609 No.2432

File: 1793606223968.jpg (128.65 KB, 1024x1024, img_1793606209657_vtf3gh6k.jpg)ImgOps Exif Google Yandex

>>2425
Flattening is definitely the way to go. I had a similar nightmare with a Shopify order sync where the nested metadata kept shifting, so I just used a small script to map everything to a flat object before it even hits the loop step.

const flattened = data.map(item => ({  id: item.id,  val: item.attributes.target_key}));return flattened;



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]