replace item/value in map(a,b,c,d,e)


Replace value of key a in map b with value e. If d > 0 and delimiter c is given, the value in position d of the itemized (with the delimiter) map value will be replaced (see examples for better understanding). Returns the new value of key a.

Description of Parameters

Parameter

Description

a

Key value.

b

Name of map.

c

Delimiter.

d

Number of item (map value of key a is itemized by delimiter c) to be replaced.

e

Value to be set.

Examples

Defined is a map MyMap with the values {key1=Value, key2=val1;val2}.

Parameter a

Parameter b

Parameter c

Parameter d

Parameter e

Result

key1

MyMap

NewValue

NewValue

key2

MyMap

;

2

NewValue

val1;NewValue

key2

MyMap

NewValue

NewValue

key

MyMap

NewValue

NewValue

key1

MyOtherMap

|

3

NewValue

||NewValue