title: create or update dynamodb
body: <p>Currently, I'm checking if the item exists with a query and then I'm using put or updateItem, I want to change it and make a single call to DDB. I want to make a query that will update or create item.</p>
  <p>Here is a example of my item:</p>
  <pre><code>{
     id: 'dsfadsf'
     fa: { &quot;apple&quot; : { &quot;S&quot; : &quot;76-100&quot; }, &quot;yolo&quot; : { &quot;S&quot; : &quot;0-25&quot; }
     pa: { &quot;finish&quot; : { &quot;BOOL&quot; : false },    &quot;userKey&quot; : { &quot;S&quot; : &quot;3e299e12-9e66&quot; }  }
     createdAt: 32432432423
  }
  </code></pre>
  <p><strong>item types:</strong></p>
  <pre><code>createdAt - Number
  fa - Map
  pa - Map
  id - String
  finish - Boolean
  key - String
  </code></pre>
  <p>If item exists I want to push a new item like {papa: 'dsfadsf'} (never modify existing item inside fa Map) and modify finish value inside pa Map</p>
  <p>This is the item after the update:</p>
  <pre><code>{
     id: 'dsfadsf'
     fa: { &quot;apple&quot; : { &quot;S&quot; : &quot;76-100&quot; }, &quot;yolo&quot; : { &quot;S&quot; : &quot;0-25&quot; }, &quot;papa&quot;: { &quot;S&quot; : &quot;dsfadsf&quot;} }
     pa: { &quot;finish&quot; : { &quot;BOOL&quot; : true },    &quot;userKey&quot; : { &quot;S&quot; : &quot;3e299e12-9e66&quot; }  }
     createdAt: 32432432423
  }
  </code></pre>
  <p>Here is what I tried and its not working</p>
  <pre><code>{
      TableName: tableName,
      Key: {
        id: &quot;dsfadsf&quot;,
      },
      UpdateExpression: `SET #id = :id, fa.${itemName} = if_not_exists(fa.${itemName}, :text), pa.finish = if_not_exists(pa.finish, :finishval), #ca = :ca`,
      ExpressionAttributeNames: {
        &quot;#id&quot;: &quot;id&quot;,
        &quot;#ca&quot;: createdAt
      },
      ExpressionAttributeValues: {
        &quot;:id&quot;: &quot;7fd9a81b-7a7c-4cfb-9c84-25dc2798a8f7&quot;,
        &quot;:text&quot;: itemText,
        &quot;:finishval&quot;: true,
        &quot;:ca&quot;: 32432432423
      },
      ConditionExpression: `attribute_not_exists(id)`,
    };
  </code></pre>