I am trying to loop through two API responses. I then want to combine these two results into one array, and then loop through it to get TransactionType, which is the value that I want. I am quite a noob at looping and it is showing. The API result looks like this:
So far, I've only made it as far as trying to loop through my code,
private async sortTransactiontypes() {
const customTypes = await API(this.params1);
const defaultTypes = await API(this.params2);
const customKey = Object.values(customTypes);
const defaultKey = Object.values(defaultTypes);
for (const key in customKey) {
console.log(JSON.stringify(`${key}: ${customKey[key]}`));
}
}
but I keep getting an "0: [object Object],[object Object],[object Object]" error.
How would I go about in doing what I want to do?
