ConstantOptions
public class ConstantOptions : MappingsBuilder
Some Mappings options that are mapping a constant value to a destination in the result payload.
-
Sets an optional basic condition that the value at the given mapping
pathneeds to match in order for this mapping to take place, where the variable may be found in apathat the root or in any nested JSON object and JSON array of the data layer.Declaration
Swift
public func ifValueIn(_ path: JSONObjectPath, equals target: String)Parameters
pathThe
pathto take the value from when comparing against the expectedvalue.targetThe target value that the source key should contain.
-
Sets an optional basic condition that the value at the given mapping
keyneeds to match in order for this mapping to take place, where the variable may be found in akeyat the root of the data layer.Declaration
Swift
public func ifValueIn(_ key: String, equals target: String)Parameters
keyThe
keyto take the value from when comparing against the expectedvalue.targetThe target value that the source key should contain.
View on GitHub