Below array i have 5 objects, with random order value, need to arrange the array as per the order key in object
i want push each object another array as per order.
var array = [
{
"name": {
"text": "javascript"
},
"order": {
"text": "4"
}
},
{
"name": {
"text": "angualr js"
},
"order": {
"text": "2"
}
},
{
"name": {
"text": "Ios"
},
"order": {
"text": "3"
}
},
{
"name": {
"text": "PHP"
},
"order": {
"text": "5"
}
}, {
"name": {
"text": "C"
},
"order": {
"text": "5"
}
}
]
can any explain how to follow the logic.