Consider as well array as object on parsing keys