-
Notifications
You must be signed in to change notification settings - Fork 54
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
std.sort does not accept second parameter #36
Comments
and looks like there are many more functions that don't take key function parameter. |
Same with My jsonnet file has following code:
Then, I will get |
This appears to be a new feature in jsonnet, with many of the @sparkprime @sbarzowski do you guys have any test suite for calls to these functions with the additional |
Hmmm... it appears in the benchmark, in the docs and tests specific to go-jsonnet, but it's missing from the main test suite. I have created an issue to add some: google/jsonnet#716 |
@lihaoyi-databricks I've implemented this functionality in my fork, if you want, feel free to take a look, and I can create a PR for you. See here: https://github.com/modusintegration/sjsonnet/blob/master/sjsonnet/src/sjsonnet/Std.scala#L487-L606 |
@javaduke yes I would love a pull request! |
When trying to sort an array of objects using
std.sort
with second parameter, e.g.std.sort(myArray, function(x) x.weight)
I'm getting this error:The text was updated successfully, but these errors were encountered: