@lindsey.homenick
You can use the typeof
function in Presto to get the type of a JSON value. Here is an example of how you can do this:
1
|
SELECT typeof(json_parse('{"key": "value"}')->'key'); |
In this example, json_parse
is used to parse the JSON string into a JSON object, and typeof
is used to get the type of the value associated with the key 'key'. The result will be the type of the JSON value.
Note that json_parse
function is used to parse a JSON string into a JSON object, so make sure to provide a valid JSON string as input.