I'm building an application, and I need to parse various restapi responses that can be either a single object response, or an array. What would be the best way to go about this other than testing the element?
{
"detail": {
}
}
or
{
"detail": []
}