When defining an object literal, parentheses indicate that the value of the expression must be the name of the property. Otherwise, if you did not use parentheses, this is the literal name.
Thus, these are equivalent ways of defining an object with a property "foo":
{ foo: 1 }
{ "foo": 2 }
"foo" as $name | { ($name): 3 }
{ somename: "foo" } | { (.somename): 4 }
source
share