I have an list of arraylist of hashmap as below. Could you please help me on how loop through it inorder to get the key and compare the key with particular data, if it matches display its respective value.
List<ArrayList<HashMap>> li = new ArrayList<ArrayList<HashMap>>();
li = SyncSettings.labelSharedInstance;
Below is the list of arraylist of hashmap storage view (and for reference i have added xml as well).
<labels>
<label id="lblMS">
<text language="EN" value="Morning Sync"/>
<text language="DE" value="Morgan Sync"/>
</label>
<label id="lblES">
<text language="EN" value="Evening Sync"/>
<text language="DE" value="Sync Abend"/>
</label>
<label id="lblAS">
<text language="EN" value="Afternoon Sync"/>
<text language="DE" value="Sync Afternoon"/>
</label>
</labels>
Initially, i will be getting the device language and i need to check the device language with language in the hashmap. If it matches i need to display it respective language.
So far what i have achieved is as below.
for (ArrayList<HashMap> entry : li) {
Set<String> keys = entry.keySet();
for (String key : keys) {
//I'm just seeing whether i'm doing in a right way or not. So i was just printing.But i was getting nothing
System.out.println("key = " + key);
System.out.println("value = " + value);
}
Could you please help me to proceed further. Thank you.
