Decode from both array and object