Question: I've written some code that converts a JSON object to an iCalendar (.ics) object and now I am trying to test it. The problem is that I can't figure out how to create a generic JSON object to use as the parameter. Some of my attempts are as follows:

```
# 1
obj_json = u'sample json data in string form'
obj = json.loads(obj_json)

# 2
# I'm not sure about this very first line. My supervisor told me to put it in but he
# has a very heavy accent so I definitely could have heard him incorrectly.
input.json
with open('input.json') as f:
    obj = json.loads(f.read())

```

Answer: 
google guava comes with the
`LinkedListMultimap`
where the iteration order corresponds to the insertion order.
I guess you could use that class or just reconsider whether a multimap is really what you want here.

For what you described in the comments I recommend writing a new class containing the information (date, accountNo, ...) and insert instances of this class into an ArrayList, LinkedList, ...
Assuming your multimap instance is a subclass of `ListMultimap<String, String>` to preserve insertion order **and** you inserted the (date, accountNo, ...) in sequence, then the following should give you the expected output.

```
Iterator<String> dates = ejLogMap.get("Date").iterator();
Iterator<String> accounts = ejLogMap.get("AccountNo").iterator();

while (dates.hasNext() && accounts.hasNext()) {
    System.out.println(dates.next() + " " + accounts.net());
}

```

---

**EDIT** triggered by (fully justified) @mueed comment - 
As-is, in your deisgn, the data is organised by *columns* (`"Date"`, `"AccountNo"`,...). You could reorganise it in *rows*, where each item is actually a *tuple* (date, accountNo, amount, status) that can be implemented in a specific POJO class, e.g. 

```
public class Transaction {
   String accountNo;
   int amount; 
   Date date;
   int status; // or an enum
   // constructor
   // getters
}

```

Then you can easily process a `List<Transaction>` or even better if transactions are unique a `Set<Transaction>`, sort it on the property you want, filter it, etc. keeping the consistency of each transaction object. If you often need to look up `Transaction` objects on a specific property, you can build a `Map<T, Transaction>` where the key is - for instance - the accountNo. And if you need to preserve the insertion order use a `LinkedHashMap<T, Transaction>`.