I am new to handling json records. I have a json record as follows:
{"responseobj":{"ResponseCode":"0","ResponseDesc":"Success"},
"objDropdown":[{"Master_id":0,"ID":"en","Value":"English","Selected":false,"IsActive":false,"Description":null,"TopupId":0,"TopupAmount":0}
,{"Master_id":0,"ID":"fr","Value":"français","Selected":false,"IsActive":false,"Description":null,"TopupId":0,"TopupAmount":0}
,{"Master_id":0,"ID":"it","Value":"italiano","Selected":false,"IsActive":false,"Description":null,"TopupId":0,"TopupAmount":0}
,{"Master_id":0,"ID":"pt","Value":"Português","Selected":false,"IsActive":false,"Description":null,"TopupId":0,"TopupAmount":0}
,{"Master_id":0,"ID":"es","Value":"español","Selected":false,"IsActive":false,"Description":null,"TopupId":0,"TopupAmount":0}
,{"Master_id":0,"ID":"de","Value":"Deutsch","Selected":false,"IsActive":false,"Description":null,"TopupId":0,"TopupAmount":0}
,{"Master_id":0,"ID":"nl","Value":"Nederlands","Selected":false,"IsActive":false,"Description":null,"TopupId":0,"TopupAmount":0}
]}'
Please teach me how to get a record from this.
You can do that with OpenJSON() - SQL server 2016 and up:
EDIT: Getting responseobj is even simpler: