STRING_TO_JSON

Description

STRING_TO_JSON parses a JSON-encoded string and returns the corresponding dictionary or list. This is useful when a field stores structured data as a raw JSON string.

Example

STRING_TO_JSON('{"key1": "value1", "key2": "value2"}')

This returns the dictionary {"key1": "value1", "key2": "value2"}.

Example with a list

STRING_TO_JSON('[{"key1": "value1", "key2": "value2"}]')

This returns a list containing one dictionary.

Last updated

Was this helpful?