How to assign numeric UID
Hi there,
I'm getting the desired output as per my need by calling the API I have, but I want to assign a numeric UID with every single response under the array as shown in the image. I am getting the ID in a string format, but I want it in numeric format in addition of this.

6 Replies
Processing...
🤖 Tuning in to the data frequencies. 📡 this might take a couple of minutes... beep boop
🤖 AI Response
You can add a numeric UID to each item in your API response array in BuildShip by using a Script node after your API call node. The Script node allows you to write JavaScript that transforms your data, such as mapping through the array and adding a sequential numeric ID to each item. This approach is consistent with BuildShip’s support for custom data transformation using scripting or custom nodes, as referenced in discussions about handling complex JSON transformations and customizing nodes with JavaScript logic. If your API response is an array, the provided script will iterate through each item, add a new field (e.g., numericId), and return the updated array. This method is flexible and can be adapted to your specific data structure or naming preferences.
🔗 References:
1. https://support.buildship.com/m/1384097843110744084
2. https://support.buildship.com/m/1326138928125837363
3. https://www.youtube.com/watch?v=mmihZ-L-Yxg
4. https://support.buildship.com/m/1336741233007263785
5. https://buildship.com/integrations/apps/json-and-buildship-database
6. https://buildship.com/blog/workflow-automation-with-apify
7. https://community.make.com/t/transform-api-response-from-collection-of-collections-to-array-of-collections-for-custom-module/2874
8. https://buildship.com/integrations/apps/json-and-loops
9. https://buildship.com/integrations/apps/buildship-workflows-and-buildship-database
BuildShip AI Support
You can easily generate and append a numeric UID to each response object in the array using an incremental counter or a UUID-to-number hash. I can help you implement that.
Hi @mide can you share the steps how?
Could you please message me? I’d like to discuss this in more detail and maybe work with you directly on it.
Done
is someone else have suggestion?