You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,
I have one small example:
var jsonObj = [{
"age": 30,
"name": "James Martin"
},
{
"age": 44,
"name": "ABC",
}
]
var family = jsonQ(JSON.stringify(jsonObj)),
pnames = family.find('name');
result ==> i am getting same result asc or desc sorting..this is happening only if i have Json array...Could you please suggest how to approach this kind of problem..Basically i have requirement where i need to do sorting based on column in json array..
pnames.sort("name",{order:'ASC'}).value()
["James Martin", "ABC"]
pnames.sort("name",{order:'DESC'}).value()
["James Martin", "ABC"]
The text was updated successfully, but these errors were encountered:
hi,
I have one small example:
var jsonObj = [{
"age": 30,
"name": "James Martin"
},
{
"age": 44,
"name": "ABC",
}
]
var family = jsonQ(JSON.stringify(jsonObj)),
pnames = family.find('name');
result ==> i am getting same result asc or desc sorting..this is happening only if i have Json array...Could you please suggest how to approach this kind of problem..Basically i have requirement where i need to do sorting based on column in json array..
pnames.sort("name",{order:'ASC'}).value()
["James Martin", "ABC"]
pnames.sort("name",{order:'DESC'}).value()
["James Martin", "ABC"]
The text was updated successfully, but these errors were encountered: