-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
enhancementNew feature or requestNew feature or request
Description
refs: google/jsonnet#930
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining#optional_chaining_with_expressions
In JSONPath, we can select deeply, even it may be null.
maybeNull: someObject?.innerObject?.whatIWantI think we can support this with a ?. instead of ..
I have implemented it with :
eval(
"""
|local obj = {a: 1};
|local obj2 = null;
|obj2?.a
|
|""".stripMargin) ==> ujson.Nullor maybe just use std.get
This project is using this syntax https://github.com/jam01/xtrasonnet
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request