Monday, August 26, 2013

How to access data of nested objects in LinkedHashMap

How to access data of nested objects in LinkedHashMap

Data present in LinkedHashMap:-
{
contacts={
id={
version=6,
lastUpdatedTimeStamp=1377,
contactID=23,
firstName=B,
lastName=K
}
}
}
Here, "contacts" & "id" are objects.
I am able to get the values of "contacts" :
LinkedHashMap map = restClient.getLinkedHashMap();
Object contactObj = map.get("contacts");
But how to get the value of "firstName"?
Any help or guidance will be well appreciated.

No comments:

Post a Comment