Skip to content
Advertisement

Getting id from one json and finding name of that code in json

I am parsing data from json, like this.

JavaScript

and json object is something like this,

JavaScript

I am getting the coin Id, and now from that coin ID, i want to scan another json file, for that specific id, and get name or symbol from there,

the other json contains,

JavaScript

My bindviewholder method,

JavaScript

Now my question is, how I can on bindviewholder class get the coin ID from first json, and then scan second json for that id and get name of coin and then do holder.settext stuff.

Now i am parsing second json as below,

JavaScript

Also, while parsing second json

JavaScript

Help would be appreciated.

Advertisement

Answer

Before setting the test using settext, you need to load the information about the second JSON content. Try this to read json information from the file.

JavaScript

To search based on the id property, Assuming you used an ArrayList.

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