I am trying to fetch data from AWS Dynamo DB scan with contains FilterExpression .I am using the following param but receiving empty response as:
{"Items":[],"Count":0,"ScannedCount":792,"LastEvaluatedKey":{"ID":"b123456789"}}"}
where i want to filter based on string from array ex: orange from fruits:['orange', 'apple', 'banana'];
Param for scan operation:
params = { TableName: table, FilterExpression: "contains (fruits, :L)", ExpressionAttributeValues: { ":L": { S :"orange" } } }
but when i use the same as command of AWS CLI. I am getting data in following format :
{"Items": [{"fruits": {"L": [{"S": "orange"}]}},{}]}
Can you please let me know what is wrong with the param i am using.