parse JSON object from response