ahausladen / JsonDataObjects

JSON parser for Delphi 2009 and newer
MIT License
413 stars 160 forks source link

How to swap elements in array #60

Open JamesInform opened 4 years ago

JamesInform commented 4 years ago

Hi Andreas

First of all, thanks for providing such a great JSON library.

I am having a json array which I want to sort using bubble sort. To do so I need to swap elements in the array, e.g. swap the 5th element with the 2nd.

What is the easiest way to do so? Would be very nice, if I could just swap elements without knowing what json type a specific element has.

If swapping is not possible, could you implement a swap function for the TJsonArray type?

Cheers James