String answer = question1?.question2?.answer
Is there a way (preferably in-built) to get the property of an object where both the following scenarios are covered:
- If the object is null, return a null value for the attribute.
- Returns null for an attribute if it doesn't exist in the object.
To top this, is there a way to chain such get operations for deeply nested attributes?