title: Extract values from a single line string in list format in a shell script
body: <p>While writing a shell script, how do I extract all values for a particular key in a single line string which is a list of tuples? For instance, my string is:</p>
  
  <pre><code>[{"key1":"value1", "key2":"value2"},{"key1":"val1","key2":"val2"}]
  </code></pre>
  
  <p>and the output should be an array containing <code>value1</code> and <code>val1</code>.</p>