loop not parsing the array properly
i am passing a array as a value in a loop but it is taking it as a single value not parsing it properly ( the array which i am passing is not nested)
here is the link my workflow please check it - https://app.buildship.com/remix/98d6edf0-a403-4dec-bd91-f3ebd6216a10
please help me as i desperately need asolution
BuildShip - Visual backend workflow builder
Visually build workflows and powerful backend logic for your apps. Powered by AI, connect to anything with or without code.



Solution:Jump to solution
@Gaurav Chadha @Chris Wright | Because You Can Thank you brother for you help i finally 😊😊 founded the issue ( i was adding an array inside items in the loop ) that's why it was self nesting it
11 Replies
Processing...
🤖 Calibrating response parameters. 🎛️ this might take a couple of minutes... beep boop
can someone human help me please i already tried solutions provided by bots like these
I think the loop node is expecting an array of objects, so if you wrap each doc.id it should work...
CollectionQuery?.map(doc => ({ id: doc.id }))
no brother this also not working , please see the input of collection query you will get the idea @Chris Wright | Because You Can
Did you have any other ideas to make it work brother

Sorry that didn't work, in these cases I often find introducing a custom node before the loop that can take the output of the collection query and format it for the loop helps, so you can simply pass it into the loop as a clean array.
@Chris Wright | Because You Can Already tried , the loop is not even working properly even when i manually passed an array like this -
[
"ACsU6G5uqdbwZM7lmNco4d0FQxu2",
"V3RIAYcrqyaEhKQjVUOLG3ottvr2",
"hlf1BXax5bdj0lCCa6CeOpTa5532"
]
for testing
it is considering it as a single value not parsing it
Yes because the items are strings not objects
@Chris Wright | Because You Can Ooooo really is that is causing problem can you please explain me more
and how can i fix it
Hi @Chinmay Khandelwal thanks for also sharing this via in-app support, we've sent you an email with the cause and fix, you can followup on email.
@Gaurav Chadha But when i tried the same thing using an array of documents from firestore query collection it is not working , i even tried .flat() to resolve the nested array issue but still it is not working
Please see the attached screenshot i think i am not passing a nested array

Solution
@Gaurav Chadha @Chris Wright | Because You Can Thank you brother for you help i finally 😊😊 founded the issue ( i was adding an array inside items in the loop ) that's why it was self nesting it