Parse nested JSON in SQL
I have this JSON: [{ "id": 1, "meta": [{ "key": "key1", "value": "ValueKey1" }, { "key": "key2", "value": "ValueKey2" } ] }, { "id": 2, "meta": [{ "key": "key2", "value": "ValueKey2" } ] }, { "id": 3, "meta": [{ "key":…
I have this JSON: [{ "id": 1, "meta": [{ "key": "key1", "value": "ValueKey1" }, { "key": "key2", "value": "ValueKey2" } ] }, { "id": 2, "meta": [{ "key": "key2", "value": "ValueKey2" } ] }, { "id": 3, "meta": [{ "key":…
Does anybody knows how to get @odata.etag value from a JSON into a SQL Server table? Many thanks! JSON string: { "@odata.context": "https://mycompany.com/Tenant/ODataV4/$metadata#Company('mycompany')/ServiceHeader/$entity", "@odata.etag":"W/"JzQ0O0NLZ0lhMkdDdkw3ZU1PbUx6M1M5V1Y4OUtUZUI5OXZOUCtjM2FRZmQ1N0E9MTswMDsn"", "Document_Type": "Order", "No": "1234", "Customer_No": "1234", "Your_Reference": "", "Payment_Terms_Code": "01", "Name": "Company ABC", "Contact_No": "4567", "Status":…
I have a JSON string which is the following: [ { "id": 103001058774, "name": "status", "label": "Status", "description": "Ticket status", "choices": { "2": [ "Open", "Open" ], "3": [ "Pending", "Pending" ], "4": [ "Resolved", "Resolved" ], "5": [ "Closed",…
I have uploaded a file here that I am trying to parse as JSON, but my code below is not working: with open('all_links_dict.json') as fd: json_data = json.load(fd) print(json_data)
I am getting 0 row when selecting from OPENJSON below. I am expecting to get all 3 values "AA" for different as_of_date for CREDIT_RTG . I tried different select statements. I am running in SQL 2016. Expected result should be…
I need help in transforming a string to json to put the values in separated lines. Using tsql (2019) How do I have to transform the provided data (payload) into a json to create the expected result or is there…
I have a SQL table containing 2 columns - first Column is the ID of the users and the second column holds the JSON Phone information. The phone information consist of Work, Home phones and whether it is a mobile…