I am new to PostgreSQL. Here is what I am trying to achieve. I will be getting a json as text as the input for the procedure and I need to parse them inside the procedure to get the data from them and save data into the tables.
Here is an example:
this is the table.
CREATE TABLE json_test2
(
id serial primary key,
name text,
age int
)
Now i am trying to create a procedure that will take a text as an input that contains json.
{
"data": [
{
"name": "kumar",
"age": 12
},
{
"name": "anand",
"age": 25
}
]
}
please create a proc that will meet my requirement