``` use com.basiscomponents.db.ResultSet use com.basiscomponents.db.DataRow rs! = new ResultSet() row! = DataRow.fromJson("{""NAME"":""Duck"",""FIRSTNAME"":"""",""Cartoon"":""Mickey Mouse""}") row!.setRowKey("NAME") rs!.add(row!) ? rs!.toJson(1,"NAME") ``` Output: [{"NAME":"NAME","NAME":"Duck","FIRSTNAME":"","Cartoon":"Mickey Mouse","meta":{"N AME":{"ColumnType":"12"},"NAME":{"ColumnType":"12"},"FIRSTNAME":{"ColumnType":"1 2"},"Cartoon":{"ColumnType":"12"}}}] We should probably - throw an error if toJson is given a field name which exists but is not the only index field in the record - ignore it in this particular case, so the field is not added twice
Output:
[{"NAME":"NAME","NAME":"Duck","FIRSTNAME":"","Cartoon":"Mickey Mouse","meta":{"N
AME":{"ColumnType":"12"},"NAME":{"ColumnType":"12"},"FIRSTNAME":{"ColumnType":"1
2"},"Cartoon":{"ColumnType":"12"}}}]
We should probably