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:[email protected]
**********************************************************************

Reply via email to