Closed mbtools closed 3 years ago
The feature itself is nice. I'm just not sure that it is a right place for it (well, I'm actually sure it is not ...). The target for members can be an array (your case), or an object - they probably should behave differently. The feature looks like a separate utility - kind of https://lodash.com/docs/#sortBy
So I think it would fit well into zcl_ajson_utils
but not directly into the members
Right. I didn't take into consideration that there could be other types in the members. I implemented it separately by doing a slice
and to_abap
into an internal table. then you can sort it any way you like and not just by one field.
New option would allow to have the members sorted: