Skip to content

Arrays not showing title, instead NULL #3

Description

@lovetolearncode

Hello Phil,
This request
arrays
was asked by someone else, but I did not see an resolution. Is this possible to do? Thanks!

Declare @JSON nvarchar(max)='{
"PaymenttDetails": [{
"PaymentDetailId": 16249750,
"Quantity": 2000,
"Weight": 2000
}]
}'

select p.[Name] as ParentName, c.[Name] as ChiledName,c.[StringValue] from parseJSON(@JSON) as p,parseJSON(@JSON) as c
Where p.Object_ID=c.Parent_ID

I am attached Image so you will get more idea for what i need from the JSON.

I also see this in my JSON file.
This results NAME showing fine as "serial_numbers" >> "serial_numbers":"SP7000000001"
This results in NAME showing a "NULL" >> "serial_numbers":["LWP10000001","LWP10000002"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions