convert response to the expected json objects