{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/273","labels_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/273/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/273/events","html_url":"https://github.com/aws/aws-sdk-ios/issues/273","id":115017373,"number":273,"title":"IN condition in scan","user":{"login":"batical","id":7248073,"avatar_url":"https://avatars.githubusercontent.com/u/7248073?v=3","gravatar_id":"","url":"https://api.github.com/users/batical","html_url":"https://github.com/batical","followers_url":"https://api.github.com/users/batical/followers","following_url":"https://api.github.com/users/batical/following{/other_user}","gists_url":"https://api.github.com/users/batical/gists{/gist_id}","starred_url":"https://api.github.com/users/batical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batical/subscriptions","organizations_url":"https://api.github.com/users/batical/orgs","repos_url":"https://api.github.com/users/batical/repos","events_url":"https://api.github.com/users/batical/events{/privacy}","received_events_url":"https://api.github.com/users/batical/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-sdk-ios/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-04T10:06:47Z","updated_at":"2015-11-04T20:27:35Z","closed_at":null,"body":"Hello, \r\n\r\nDiscovering dynamoDB with an IOS app.\r\n\r\nGot some issue trying to find potential regitered user from a list of item\r\n\r\nLet' imagine I got a User table with mail as a key.\r\nI got an array of 50 mails, and I would like to know which mail is already in the database.\r\n\r\nI got it working using a lambda invoke function.\r\n\r\n```\r\n TableName : 'Users',\r\n        AttributesToGet : ['mail'],\r\n        ScanFilter: {\r\n            'mail': {\r\n            ComparisonOperator: 'IN',\r\n            AttributeValueList: mails\r\n            }\r\n        }\r\n```\r\n\r\nBut I cannot manage to do it directly from my ios using scanfilter ou filterExpression\r\n\r\n```\r\nlet scanExpression : AWSDynamoDBScanExpression = AWSDynamoDBScanExpression()\r\n\t\tlet usermailCondition = AWSDynamoDBCondition()\r\n\t\tlet v1    = AWSDynamoDBAttributeValue();\r\n\t\tv1.SS = mails\r\n\t\tusermailCondition.comparisonOperator = AWSDynamoDBComparisonOperator.IN\r\n\t\tusermailCondition.attributeValueList = [ v1 ]\r\n\t\tscanExpression.scanFilter = [\"mail\" : \tusermailCondition]\r\n```\r\n\r\n```ComparisonOperator IN is not valid for SS AttributeValue type}```\r\nIs it on purpose ? is there another way of doing it ?\r\n\r\nthanks"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/comments/153852873","html_url":"https://github.com/aws/aws-sdk-ios/issues/273#issuecomment-153852873","issue_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/273","id":153852873,"user":{"login":"yosuke-matsuda","id":1459206,"avatar_url":"https://avatars.githubusercontent.com/u/1459206?v=3","gravatar_id":"","url":"https://api.github.com/users/yosuke-matsuda","html_url":"https://github.com/yosuke-matsuda","followers_url":"https://api.github.com/users/yosuke-matsuda/followers","following_url":"https://api.github.com/users/yosuke-matsuda/following{/other_user}","gists_url":"https://api.github.com/users/yosuke-matsuda/gists{/gist_id}","starred_url":"https://api.github.com/users/yosuke-matsuda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yosuke-matsuda/subscriptions","organizations_url":"https://api.github.com/users/yosuke-matsuda/orgs","repos_url":"https://api.github.com/users/yosuke-matsuda/repos","events_url":"https://api.github.com/users/yosuke-matsuda/events{/privacy}","received_events_url":"https://api.github.com/users/yosuke-matsuda/received_events","type":"User","site_admin":false},"created_at":"2015-11-04T20:27:35Z","updated_at":"2015-11-04T20:27:35Z","body":"As the error message suggests, your request has invalid structure. `scanFilter` is a legacy parameter for backward compatibility. You should use [`filterExpression`](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/QueryAndScan.html#FilteringResults).\r\n\r\nPlease note that `scan` potentially consumes a lot of read capacity units. `query` is usually more efficient. You should carefully pick your table structure and querying strategy based on your use case."}}