I have something like
[
{
"key": { "subkey1":1, "subkey2":"a" }
},
{
"key": { "subkey1":10, "subkey2":"b" }
},
{
"key": { "subkey1":5, "subkey2":"c" }
}
]
And would need to have :
[
{
"key": { "subkey1":10, "subkey2":"b" }
},
{
"key": { "subkey1":5, "subkey2":"c" }
},
{
"key": { "subkey1":1, "subkey2":"a" }
}
]
Many thanks!
EDIT : I'd like to sort by subkey1, this wasn't clear previously.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…