format_timestamp applied at wrong level
I'm trying to format a timestamp using the format_timestamp filter (#1) that is on the output of an add-on and the add-on could return multiple values. Instead of the date at #2 being updated, the function is adding a new date #3. What do I have to change have the date at #2 updated?
Thanks!
Best Answer
-
Yeah it changed because its possible to return multiple add-on objects (i.e. an array).
I fixed it by looping within the loop. 😀
Answers
-
Hi,
It seems that you have one additional level 0 to include in your update path. Try item.subsidies.0.submit_date
-
Thanks @Pawel Magdanski that worked for the first item that was added on, but not for the second - see screenshot. I am thinking I might need a loop on the loop, to loop through all subsidies attached to the user?
-
Your JSON structure changed on your second screenshot, probably you need to do something about that so it is always consistent
-
I think it lies in the second condition, you are creating workers in two different ways depending on status of subsidies and the structure of both of those is different
-
@Pawel Magdanski I fixed it per my above comment. Thanks for your input.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback