am trying to read List of HashMap which is sent from java to javascript, in javascript its taking as string, am not able to break that further because that will make logic too complicated.
List<HashMap<String,String>> tailDetails = new ArrayList<HashMap<String,String>>();
while(tailoredDetails.next())
{
HashMap<String,String> each = new HashMap<String,String>();
each.put(tailoredDetails.getString("RECORD"),
tailoredDetails.getString("BILLABLE"));
tailDetails.add(each);
}
TailoredObjRepVO.setTailoredRecords(tailDetails);
arlTailoredTransRecords.add(TailoredObjRepVO);
This is the data that i want to read in Javascript and display as table
am reading like this in javascript
var message = document.all.item("tailoredAdjustmentItemsList["+length+"]["+breadth+"].tailoredRecords").value;
When I check the source from application it is like this
<input type="hidden" name="tailoredAdjustmentItemsList[0][0].tailoredRecords" value="[{TUT7R BOMKMG1 =Y}, {TUT7R BOMWUH1 =Y}, {TUT7R DACKMG1 =Y}, {TUT7R DACNGB1 =Y}, {TUT7R DELKMG1 =Y}, {TUT7R KMGBOM1 =Y}, {TUT7R KMGDAC1 =Y}, {TUT7R KMGDEL1 =Y}, {TUT7R KMGMAA1 =Y}, {TUT7R MAAKMG1 =Y}, {TUT7R MAAWUH1 =Y}, {TUT7R WUHBOM1 =Y}, {TUT7R WUHMAA1 =Y}]">
I tried JSONObject, but the problem here is JSON Jar is not there in our project if I now go ahead and add we have to test the complete application for this change which we are not ready to do.
I need a mechanism to read List of HashMap data and populate in HTML Table.
Thanks in advance