You need to sign in to do that
Don't have an account?
VSK98
convert the list of JSON objects into a object in JSON
Hi All,
How to convert the below response into custom response using JSON
IF Groupid== null then I have to remove those fields and the expected response is below
VSK98
How to convert the below response into custom response using JSON
{ "groupid": null, "group_name": null, "children": [{ "Street": "PRINCES HIGHWAY", "PostalCode": "2538", "CustomerName": "MILTON ULLADULLA HOSPITAL", "CustomerId": "94107804", "Country": "Australia", "City": "MILTON", "Assetcnt": "0" }, { "Street": "COWPER STREET", "PostalCode": "2502", "CustomerName": "PORT KEMBLA HOSPITAL", "CustomerId": "94105686", "Country": "Australia", "City": "WARRAWONG", "Assetcnt": "0" }, { "Street": "Great Western Highway", "PostalCode": "2790", "CustomerName": "THE NEW LITHGOW HOSPITAL", "CustomerId": "94107702", "Country": "Australia", "City": "LITHGOW", "Assetcnt": "0" }, { "Street": "Shoalhaven Road", "PostalCode": "2540", "CustomerName": "SHOALHAVEN DISTRICT MEMORIAL HOSPIT", "CustomerId": "9487942", "Country": "Australia", "City": "NOWRA", "Assetcnt": "0" }] }
IF Groupid== null then I have to remove those fields and the expected response is below
"children": [{ "Street": "PRINCES HIGHWAY", "PostalCode": "2538", "CustomerName": "MILTON ULLADULLA HOSPITAL", "CustomerId": "94107804", "Country": "Australia", "City": "MILTON", "Assetcnt": "0" }] "children": [{ "Street": "COWPER STREET", "PostalCode": "2502", "CustomerName": "PORT KEMBLA HOSPITAL", "CustomerId": "94105686", "Country": "Australia", "City": "WARRAWONG", "Assetcnt": "0" }] "children": [{ "Street": "Great Western Highway", "PostalCode": "2790", "CustomerName": "THE NEW LITHGOW HOSPITAL", "CustomerId": "94107702", "Country": "Australia", "City": "LITHGOW", "Assetcnt": "0" }] "children": [{ "Street": "Shoalhaven Road", "PostalCode": "2540", "CustomerName": "SHOALHAVEN DISTRICT MEMORIAL HOSPIT", "CustomerId": "9487942", "Country": "Australia", "City": "NOWRA", "Assetcnt": "0" }]Regards,
VSK98
Thanks for the response!!
My end Goal is I need to display the Tree structure on the page. If the child doesn't have the parent value, the records should display as a single row without chevron down button.
In my response, if Groupname == null i need to skip the token & expected output JSON should be like this
AdvThanks,
VSK98