Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Property defined as null or consisting of sub-properties

Question
Rick Prichett · May 3, 2021

Property defined as null or consisting of sub-properties

Needing to know how to define a property that can either be sent in my response as 

"members": null,

or 

"members": [
                {
                    "dob": "1905-05-01",
                    "firstName": "BOB",
                    "middleName": "T",
                    "nameSuffix": "",
                    "genderCode": "M",
                    "lastName": "COLLINS",
                    "memberId": "123421741",
                    "relationship": "Subscriber"
                }
            ],

Not sure if this is possible.  Currently defined as 

Property members As %VarString;

#InterSystems IRIS #InterSystems IRIS for Health
Product version: IRIS 2020.1

Source URL:https://community.intersystems.com/post/property-defined-null-or-consisting-sub-properties