I have this Schema:
{
   product: S // Primary Key, // my Hash
   media: L // List of Maps
}
Each media item will be like this:
[
   { 
      id: S, // for example: id: uuid()
      type: S, // for example: "image"
      url: S // for example: id: "http://domain.com/image.jpg"
   }
]
Sample Data:
{
    product: "IPhone 6+",
    media: [
        {
            id: "1",
            type: "image",
            url: "http://www.apple.com/iphone-6-plus/a.jpg"
        },
        {
            id: "2",
            type: "image",
            url: "http://www.apple.com/iphone-6-plus/b.jpg"
        },
        {
            id: "3",
            type: "video",
            url: "http://www.apple.com/iphone-6-plus/overview.mp4"
        }
    ]
}
I want to be able to remove from media list by id. Something like: "From product: 'IPhone 6+', remove the media with id: '2'"
After the query, the Data should be like this:
{
    product: "IPhone 6+",
    media: [
        {
            id: "1",
            type: "image",
            url: "http://www.apple.com/iphone-6-plus/a.jpg"
        },
        {
            id: "3",
            type: "video",
            url: "http://www.apple.com/iphone-6-plus/overview.mp4"
        }
    ]
}
How should i express query like this? I saw a post on UpdateItem but i can't find a good example for this query type.
Thanks!
 
    