I am stuck at a piece of code where I need to get the expression result based on the passed dictionary. For example: expressionString = "(val1 + val2)" How it is possible to pass these values from an dictionary or somewhere else. I searched many places but does't work for me.
let expressionString : String = "(val1 + val2)" as String
let expression = NSExpression(format: expressionString)
In above case I would like to know how I can map these val1 and val2 data by passing any argument.
Is it can be achieve by let ex = NSExpression(format: expressionString, argumentArray:[parameter])
?