Skip to content
Advertisement

JSON – how to parse it?

I just got a problem about this response. Supposedly if I want to choose item from the response it must be an array value.

JavaScript

Actually must be like this one right? (let me know if I’m mistaken)

JavaScript

My code:

JavaScript

Then I want to put telegraphicTransferBankMapItem.xxxxxx as bankId and telegraphicTransferBankMapItem.yyyyyyy as bankName.

Advertisement

Answer

Use your first json and change your loop like,

JavaScript

Live Demo

Also you should bank-id as key in your json rather than of bank name.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement