Hi Long, first of all, thanks for your interest and re-submission again, I personally appreciate your effort there on completing the test.
Regarding the issue opening here, I'd say your technical choice on resolving the response is not sufficient. It's simply unscalable and not generic enough to handle different keys scenario. A better approach in my opinion, is to have the data generically unmarshalled/parsed as a part of the converting before using, typically you may want to have a look at this adapter
https://github.com/kamikat/moshi-jsonapi
Hi Long, first of all, thanks for your interest and re-submission again, I personally appreciate your effort there on completing the test.
Regarding the issue opening here, I'd say your technical choice on resolving the response is not sufficient. It's simply unscalable and not generic enough to handle different keys scenario. A better approach in my opinion, is to have the data generically unmarshalled/parsed as a part of the converting before using, typically you may want to have a look at this adapter https://github.com/kamikat/moshi-jsonapi
If you're interesting, you may take a read at this post as well to see what else can we leverage with this format type: https://www.birbit.com/jsonapi-is-a-blessing-for-offline-ready-apps/