dynoexpr icon indicating copy to clipboard operation
dynoexpr copied to clipboard

Condition Expression like "<> 10.10.10" produces NaN in ExpressionAttributeValues

Open ankit-aabad opened this issue 7 months ago • 0 comments

for following expression

const params = dynoexpr({
  KeyCondition: { id: '567' },
  Condition: { ip: '<> 10.10.10.10' },
  Filter: { color: 'blue' },
  Projection: ['weight', 'size'],
});
console.log(params);

dynoexpr produces

{
  KeyConditionExpression: '(#nca40fdf5 = :v8dcca6b2)',
  ExpressionAttributeNames: {
    '#nca40fdf5': 'id',
    '#n22c40d10': 'ip',
    '#n2d334799': 'color',
    '#neb86488e': 'weight',
    '#n0367c420': 'size'
  },
  ExpressionAttributeValues: { ':v8dcca6b2': '567', ':veb17932c': NaN, ':v792aabee': 'blue' },
  ConditionExpression: '(#n22c40d10 <> :veb17932c)',
  FilterExpression: '(#n2d334799 = :v792aabee)',
  ProjectionExpression: '#neb86488e,#n0367c420'
}

in ExpressionAttributeValues produces ':veb17932c': NaN whenever we have more than one dot like 10.10.10 it considers as number and gives NaN

ankit-aabad avatar Jun 20 '25 06:06 ankit-aabad