Handle json left overs correctly when array is used where hash should be