I have a table with a single row of data which has a nvarchar(MAX) type column, lets name the column as json_column and the values of the column are like below:
{
"data": [
    {
        "name": "john",
        "num": "123"
    },
    {
        "name": "peter",
        "num": "345"
    },
    {
        "name": "donald",
        "num": "789"
    },
 ]
}
Now how can I get the value of num where name is passed as input to a where clause or query?
My query should return only the value of num.
For example: lets say I need the value of num where name is 'john' and the query should return me 123.
 
                        
I just found the answer and the query can be written as follows: