Open samer1977 opened 6 months ago
Hi, Samer. Yes, sort
is such a problematic, lacking operation, but yet a workaround might be given for some cases through use of some extra shift
transformation spec for your current case such as
[
{
"operation": "shift",
"spec": {
"*": {
"*": {
"*": {
"@": ".&3.&1.&"
}
}
}
}
},
{
"operation": "sort"
},
{
"operation": "shift",
"spec": {
"*": {
"*": "&1[]"
}
}
}
]
Hi ,
The sort spect or the the list sort function in the modify overwrite beta spec wont sort if the list is complex objects.
Example:
Input:
Sort Spec:
Output:
Expected:
Also if you try the sort function in the modify-overwrite-beta it wont work as well:
If the items array was simple array of ["2","1"] both spec will work. If items changed from an array to complex objects the sort spec will work! . Why only when its array of complex object it doesnt work. to me this is a bug.