Second question of the day :)
I have two ArrayLists containing data from two different Json APIs like:
coinList
coinList = new ArrayList<>();
priceLIst = new ArrayList<>();
coinList: [{coin=Litecoin, confirmed=0.00}, {coin=Bitcoin, confirmed=0.00}, {coin=Zcoin, confirmed=0.00}]
priceList
priceList: [{coin=Bitcoin, price=1000}, {coin=Litecoin, price=1000}, {coin=Zcoin, price=1000}]
Is there a way to add the "price" for the second list to the first one where indexes coin match? Like, Bitcoin price to the Bitcoin in the first list and so on? The coins are in different orders in each list, but are formated the same. The idea would be to end up with a list like:
mergedList = new ArrayList<>();
mergedList: [{coin=Litecoin, confirmed=0.00, price=1000}, {coin=Bitcoin, confirmed=0.00, price=1000}]
Obviously, the data in the lists is for ilustration purposes only :P The real lists contain a few more things for each coin in the first list, but, unless I'm much mistaken, that should not matter.
Hopefully this makes sense. I'm very new to this stuff, so any help would be appreciated, especially very noob friendly help! :)
Thanks!