Casting list of objects to list of maps in java : <p>I'm having a List of Objects which look like this. </p>

<pre><code>[
    [
    "Abhay Pawde",
    "Development"
    ],
    [
    "Dinesh",
    null
    ]
]
</code></pre>

<p>I want to convert them to List of maps for example mentioned below:</p>

<pre><code>[
    [
    "name":"Abhay Pawde",
    "dept":"Development"
    ],
    [
    "name":"Dinesh",
    "dept":null
    ]
]
</code></pre>

<p>How do I achieve this in Java ? I'm not sure if there is any other solution mentioned here. Please let me know. The list of Objects are obtained after querying the database. </p>
