title: bash script dictionary get values by key?
body: <p>one of my recent tasks includes creating a dictionary structure in Linux Shell. I have tried below code</p>
  
  <pre><code>    declare -A item_1
      item_1["value"]="hello"
      temp=item_1
      eval result="${item_1["value"]}" #Approach 1
      eval result="${$temp["value"]}" #Approach 2
      echo $result
  </code></pre>
  
  <p>by doing this Approach 1 can get value "hello", but how can I get Approach 2 print the same value by using $temp?</p>