dynamo-types icon indicating copy to clipboard operation
dynamo-types copied to clipboard

updates on lists

Open rogueturnip opened this issue 5 years ago • 0 comments

Hi,

Great library, found it very useful in my project and I've been able to figure out most things by looking at the code, however, I'm stuck on one item.

I'm trying to do updates on an item that contains a List of tags. I've used this example:

// UpdateItem calls
await Card.primaryKey.update(12345, { likesCount: ["ADD", 1] }, { 
  condition: { id: attributeExists() } ,
});

as a basis for it but where I'm stuck is based on the Dynamo documents I should be able to do a tags: ["SET", "tag1", "tag2", "tag3"] and it will modify the list. When I do this it fails for me. I'm hoping there is something simple I'm missing.

Thanks!

rogueturnip avatar Jun 26 '20 18:06 rogueturnip