I can sort this array of store objects by their \'flagship\' boolean property, but how can I safely unwrap the \'flagship\' property first?
le
How about:
$0.flagship == true && $1.flagship != true
The left side will succeed if the value is not nil and is true, the right side will succeed if the value is either nil or false.