
Answer-first summary for fast verification
Answer: FROM_JSON (json value, schema of json)
The `FROM_JSON` function is used to convert a JSON string into a Struct data type. It requires the JSON string and the schema of the JSON as arguments. The syntax is `from_json(jsonStr, schema [, options])`, where `jsonStr` is a STRING expression specifying a row of JSON data, `schema` is a STRING literal or invocation of `schema_of_json` function, and `options` is an optional MAP literal specifying directives. For more details, refer to the [documentation](https://docs.microsoft.com/en-us/azure/databricks/sql/language-manual/functions/from_json).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.