title: How to retrieve value for a key from a list of dictionary?
body: <p>I have a list like the one below:</p>
  
  <pre><code>test_1 = [{'path': 'remote_path'}, {'dir': 'local_dir'}]
  </code></pre>
  
  <p>I used the following to retrieve the value </p>
  
  <pre><code>print (list(map(itemgetter('path'), test_1)))
  </code></pre>
  
  <p>However when I run this it gives me the following error : KeyError: 'path'</p>
  
  <p>Any idea what I might be doing wrong or I am using it in an incorrect way. </p>