-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add an object to the end of an array with unknown length #1262
Comments
Hi @estigma88, this problem can be easily fixed withe the
Hope i helped |
Hi @LucaBiscotti , thanks for the help, however, the solution has some drawbacks for our use case:
I was hoping for something more simple, as follows:
Where If something similar is not supported, I am open to contribute the change to JOLT, if you think it makes sense and give me some clues about where to start.. |
Hi @estigma88, unfortunately there is no possible way of doing what you say by only using the shift operation (as far as I know).
I wrote a guide you can use to better understand what's going on with those operations, you can find it here |
Hi @estigma88
I hope this helps! |
Thank you all for the help, however, the complexity is still hight, so, we are going to evaluate a switch from JOLT to JsonPatch, as seems like JOLT addresses a lot of features we don't truly need |
Hi everyone, your help:
Request:
Expected result:
Notice how we want to add the
stage3
object to the end of the array. We are aware that we can use the following transformation:However, it implies we must know the index where we want to add the new element, and in our use case, the index is unknown, so, ideally, we just want to add at the end of the array.
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: