SQLTeam.com | Weblogs | Forums

Parsing json


#1

I want to pass a json string and parse it so I can add the fields to a table

how can I parse this to a simple table

select @jsondata='[
{
"id" : "12343",
"email": "dfd@hotmail.com1",
"fname": "Pdfasd",
"lname": "Ddafsd",
"number": "082111"
},

{ 
	"id" : "678",
	"email": "pe@a.com2",
	"fname": "john",
	"lname": "Doe",
	"number": "0821112"
}

]'


#2

SQL 2016 has JSON parsing ... would that work for you?


#3

no i don't have 2016 yet


#4

But now you have the justification?!! :slight_smile: