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
Filtering arrays #46
Comments
I don't know if it will work by try using #copy |
You mean #delete? Passing it a path which resolves to elements that don't meet the criteria using an expression like |
I was thinking in #copy, something like this: I've tried changing it to accept multiple results and I've managed to obtain the result you want, but I had to change other stuff that impacts other possible bulk functions that may follow. I'll get back to this at the weekend. |
#48 |
Nice work courela. I actually tried to use #valueof to start and then switched to loop since #valueof didn't support arrays. Are you planning to merge with your develop branch? I'd like to get your custom function changes as well. |
I am waiting for @WorkMaze to eventually merge the pull requests, then combine them all. I don't want to create a parallel package, since I'm only a contributor, all the work was done by him. |
Funny, I didn't realize that this was possible until now: |
I'm trying to create a transform that just filters objects from an array, and it works, except the value is a string containing json objects instead of json objects.
A simple example:
I have JSON that looks like this:
Applying a transform that selects only those objects from the array with type t1:
I get this result:
{"t1_products":["{\"name\":\"p1\",\"type\":\"t1\"}","{\"name\":\"p3\",\"type\":\"t1\"}"]}
I was expecting:
I have found if I create a new object in the loop like:
Then I get json objects as the value of each product, but I'd rather not add an unnecessary object to the output.
The text was updated successfully, but these errors were encountered: