Really struggling to find a solution here. I have the following data:
var arr = [
{ Main: {type: "object", ...} }
{ Poller: {type: "object", ...} }
{ connection: {type: "array", ...} }
{ Profile1: {type: "array", ...} }
{ Sender: {type: "object", ...} }
{ Profile2: {type: "array", ...} }
];
My goal is to generate an array that lists the objects of type: array
first. I tried various implementations of the sort() method but don't know how to account for each nested object having its' own key. Any help is appreciated