title: PostgreSQL update one of jsonb array by the condtion child's key
body: <p>In PostgreSQL, my column type is json , the data is json array like:</p>
  
  <pre><code>[{"attsId": "42a2ce04-52ab-4a3c-8dfb-98c3d14b307d", "planId": 46, "filePath": "fileOperate\\upload", "cfileName": "潜在客户名单 (1).xls", "ufileName": "42a2ce04-52ab-4a3c-8dfb-98c3d14b307d.xls"}, {"attsId": "1adb2f13-00b0-4780-ae76-7a068dc3289c", "planId": 46, "filePath": "fileOperate\\upload", "cfileName": "潜在客户名单.xls", "ufileName": "1adb2f13-00b0-4780-ae76-7a068dc3289c.xls"}, {"attsid": "452f6c62-28df-47c7-8c30-038339f7b223", "planid": 48.0, "filepath": "fileoperate\\upload", "cfilename": "技术市场印花税.xls", "ufilename": "452f6c62-28df-47c7-8c30-038339f7b223.xls"}]
  </code></pre>
  
  <p>I want update one of the array data by element key like:</p>
  
  <pre><code>UPDATE plan_base 
      set atts-&gt;.. = {"planId":47,"name":"qm"} 
  where atts-&gt;"planId"= 46 and id=2;
  </code></pre>
  
  <p>and someone has beterr way to do it</p>