I want to check if an array contains \"role\". If it does, I want to move the \"role\" to the front of the array.
\"role\"
var data= [\"ema
var data= ["email","role","type","name"]; data.splice(data.indexOf("role"), 1); data.unshift('role');