I haven't found something in my research so I thought someone can help me here.
My problem is that I want to sort an array of objects which contains a status:
{
    "data":[
        {
            "status":"NEW"
        },
        {
            "status":"PREP"
        },
        {
            "status":"CLOS"
        },
        {
            "status":"END"
        },
        {
            "status":"ERR"
        },
        {
            "status":"PAUS"
        }
    ]
}
Now I want to set a fixed sort order like all objects with the status "END" coming first then all objects with the status "PREP" and so on.
Is there a way to do that in JavaScript?
Thanks in advance :)
 
     
    