without an additional component/plugin I would write a routine to extract the object, then no matter how deep or how your current configuration changes you can extract it.
I have only thought about this for a few moments but... something like: Get_object(Source_Object;Property) -> object Get object properties with types if the object/property desired is not at the first level for every object Get_Object(ob get(Source_Object;Next_Object);Property) else $0:=ob Get(Source_Object;Property) end if Chip On Fri, 25 Oct 2019 13:58:10 -0700, Tom Benedict via 4D_Tech wrote: > I’m new to objects. I have an object which holds a range of keys and > values. Some of the values are objects. I figured I could just use > the OB Get command with dot notation to reference a key in a nested > object, but that doesn’t seem to be supported. > > Here’s my example: > > C_OBJECT(myObject) > > myObject := > "{ > "id": "evt_1FXWZKGX5QBs0BzAQsOMqk3f", > "object": "event", > "created": 1572024442, > "data": { > "object": { > "object": "charge", > "amount": 4275, > "billing_details": { > "address": { > "city": "Burien", > "postal_code": "98166", > "state": "WA" > }, > "name": "Willy Wonka", > }, > "type": "charge.succeeded" > }" > > If I want to get the value of: > > myObject.data.object.billing_details.address.postal_code > > I have to use: > > OB Get(OB Get(OB Get(myObject;"data");"object");”billing_details");” > address");”postal_code”) > > rather than: > > OB Get(myObject;data.object.billing_details.address.postal_code) > > I see that Cannon created a dot notation component some years ago. Is > that the only ‘easy’ way to do this or have I missed something? > > Thanks, > > Tom Benedict > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ********************************************************************** We have done so much, with so little, for so long; We are now qualified to anything with nothing <sigh> - unknown ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **********************************************************************