QueryStringToMap

Description

Converts a string field that contains a URL query string (...?key1=value1&key2=value2) to a map of key:value pairs. From the map you can extract fields using the map notation:
map#'fieldname'

Syntax

QueryStringToMap(string_expression)

Examples

QueryStringToMap('http://someurl/?origin=135&origin=246&id=321') returns  [origin#'135,246',id#'321'] which is a map with two keys: origin and id. Note that the value for origin contains both values from the original query string separated by comma.

Notes

If the input string contains a question mark (?) then the part that follows will be processed ("&" is used to split pairs and "=" is used to split keys and values). If the input string does not contain a question mark, the entire string will be processed in the same manner.

Return value datatype

Map of string values

Impact of null value

If input is null, returns an empty map.